コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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);
        }