Example #1
0
 public void AddLine(CanvasPointF p1, CanvasPointF p2)
 {
     if (_path.PointCount == 0)
     {
         _startFigure = false;
         _path.MoveTo(p1.ToSKPoint());
         _path.LineTo(p2.ToSKPoint());
     }
     else
     {
         _path.LineTo(p1.ToSKPoint());
         _path.LineTo(p2.ToSKPoint());
     }
 }
Example #2
0
 public void DrawBitmap(IBitmap bitmap, CanvasPointF pointF)
 {
     _canvas?.DrawBitmap((SKBitmap)bitmap.EngineElement, pointF.ToSKPoint(), new SKPaint()
     {
         FilterQuality = this.InterpolationMode.ToSKFilterQuality()
     });
 }
Example #3
0
        public void DrawText(string text, IFont font, IBrush brush, CanvasPointF pointF, IDrawTextFormat format)
        {
            var skPoint = pointF.ToSKPoint();
            var skPaint = GetSKPaint(font, (SKPaint)brush.EngineElement, format, ref text, ref skPoint);

            DrawMultilineText(text, skPoint, skPaint);
        }
Example #4
0
 public void TranslateTransform(CanvasPointF point)
 {
     _canvas?.Translate(point.ToSKPoint());
 }
Example #5
0
 public void DrawText(string text, IFont font, IBrush brush, CanvasPointF pointF)
 {
     DrawMultilineText(text.RemoveReturns(), pointF.ToSKPoint(), GetSKPaint(font, (SKPaint)brush.EngineElement));
 }
Example #6
0
 public void DrawLine(IPen pen, CanvasPointF p1, CanvasPointF p2)
 {
     _canvas?.DrawLine(p1.ToSKPoint(), p2.ToSKPoint(), GetSKPaint(pen));
 }