中添加填充颜色和笔触颜色
如何使用skia尖锐添加rect或任何形状,并在iOS
要绘制填充和中风,您必须进行两个油漆操作:
// the rectangle
var rect = SKRect.Create(10, 10, 100, 100);
// the brush (fill with blue)
var paint = new SKPaint {
Style = SKPaintStyle.Fill,
Color = SKColors.Blue
};
// draw fill
canvas.DrawRect(rect, paint);
// change the brush (stroke with red)
paint.Style = SKPaintStyle.Stroke;
paint.Color = SKColors.Red;
// draw stroke
canvas.DrawRect(rect, paint);