如何使用Skia Sharp添加RECT,并将填充颜色和笔划颜色涂在该物体中



如何使用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);

相关内容

  • 没有找到相关文章

最新更新