2017-02-17 81 views

回答

3

要绘制两个填充和中风,你必须做两个喷漆操作:

// 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); 
+0

感谢@Matthew的帮助,你能帮我找到通过UIVIew和SkiaSharp绘图的区别,看起来两者都很相似。 – Devaraj

+0

这样没有真正的区别。但SkiaSharp的优势在于,代码在大多数平台上都可以100%重用 - 服务器移动,Windows到Linux。 – Matthew