예제 #1
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);
        }
예제 #2
0
 public void DrawBitmap(IBitmap bitmap, CanvasPointF pointF)
 {
     _canvas?.DrawBitmap((SKBitmap)bitmap.EngineElement, pointF.ToSKPoint(), new SKPaint()
     {
         FilterQuality = this.InterpolationMode.ToSKFilterQuality()
     });
 }
예제 #3
0
        private void PerformSymbolTransformation(float rotation)
        {
            var offset = new CanvasPointF(_hOffset, _vOffset);

            //Current.Engine.DrawTextOffestPointsToFontUnit(ref offset);

            SymbolTransformation.Transform(_angle + rotation, offset.X, offset.Y, out _xOffset, out _yOffset);
        }
예제 #4
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());
     }
 }
예제 #5
0
 public void AddLine(CanvasPointF p1, CanvasPointF p2)
 {
     _path.AddLine(p1.X, p1.Y, p2.X, p2.Y);
 }
예제 #6
0
 static public PointF ToGdiPointF(this CanvasPointF canvasPoint)
 {
     return(new PointF(canvasPoint.X, canvasPoint.Y));
 }
예제 #7
0
 public void DrawTextOffestPointsToFontUnit(ref CanvasPointF offset)
 {
     //offset.X = offset.X.PointsToPixels() / 1.2f;
     //offset.Y = offset.Y.PointsToPixels() / 1.2f;
 }
예제 #8
0
 public void DrawTextOffestPointsToFontUnit(ref CanvasPointF offset)
 {
     // System.Drawing use unit "points" => do nothing
 }
예제 #9
0
 static public SKPoint ToSKPoint(this CanvasPointF point)
 {
     return new SKPoint(point.X, point.Y);
 }
예제 #10
0
 public void TranslateTransform(CanvasPointF point)
 {
     _canvas?.Translate(point.ToSKPoint());
 }
예제 #11
0
 public void DrawText(string text, IFont font, IBrush brush, CanvasPointF pointF)
 {
     DrawMultilineText(text.RemoveReturns(), pointF.ToSKPoint(), GetSKPaint(font, (SKPaint)brush.EngineElement));
 }
예제 #12
0
 public void DrawLine(IPen pen, CanvasPointF p1, CanvasPointF p2)
 {
     _canvas?.DrawLine(p1.ToSKPoint(), p2.ToSKPoint(), GetSKPaint(pen));
 }
예제 #13
0
        public void TranslateTransform(CanvasPointF point)
        {
            CheckUsability();

            _graphics.TranslateTransform(point.X, point.Y);
        }
예제 #14
0
        public void DrawLine(IPen pen, CanvasPointF p1, CanvasPointF p2)
        {
            CheckUsability();

            _graphics.DrawLine((Pen)pen.EngineElement, p1.ToGdiPointF(), p2.ToGdiPointF());
        }
예제 #15
0
        public void DrawText(string text, IFont font, IBrush brush, CanvasPointF pointF, IDrawTextFormat format)
        {
            CheckUsability();

            _graphics.DrawString(text, (Font)font.EngineElement, (Brush)brush.EngineElement, pointF.ToGdiPointF(), (StringFormat)format?.EngineElement);
        }
예제 #16
0
        public void DrawBitmap(IBitmap bitmap, CanvasPointF pointF)
        {
            CheckUsability();

            _graphics.DrawImage((Bitmap)bitmap.EngineElement, pointF.ToGdiPointF());
        }