public void DrawRectangle(AbsoluteRectangle rectangle, IBrush fill) { canvas.Save(); var paint = fill.ToSKPaint(); canvas.DrawRect(new SKRect(rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom), paint); canvas.Restore(); }
public void DrawLine(AbsoluteLine line, IBrush brush) { canvas.Save(); var paint = brush.ToSKPaint(); canvas.DrawLine(line.X1, line.Y1, line.X2, line.Y2, paint); canvas.Restore(); }
public static SKPaint ToSKPaint(this Typeface typeface, IBrush brush) { var paint = brush.ToSKPaint(); paint.Typeface = SKTypeface.FromFamilyName(typeface.FontFamily); paint.TextSize = typeface.Size; return(paint); }