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); }
public void DrawBitmap(IBitmap bitmap, CanvasPointF pointF) { _canvas?.DrawBitmap((SKBitmap)bitmap.EngineElement, pointF.ToSKPoint(), new SKPaint() { FilterQuality = this.InterpolationMode.ToSKFilterQuality() }); }
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); }
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()); } }
public void AddLine(CanvasPointF p1, CanvasPointF p2) { _path.AddLine(p1.X, p1.Y, p2.X, p2.Y); }
static public PointF ToGdiPointF(this CanvasPointF canvasPoint) { return(new PointF(canvasPoint.X, canvasPoint.Y)); }
public void DrawTextOffestPointsToFontUnit(ref CanvasPointF offset) { //offset.X = offset.X.PointsToPixels() / 1.2f; //offset.Y = offset.Y.PointsToPixels() / 1.2f; }
public void DrawTextOffestPointsToFontUnit(ref CanvasPointF offset) { // System.Drawing use unit "points" => do nothing }
static public SKPoint ToSKPoint(this CanvasPointF point) { return new SKPoint(point.X, point.Y); }
public void TranslateTransform(CanvasPointF point) { _canvas?.Translate(point.ToSKPoint()); }
public void DrawText(string text, IFont font, IBrush brush, CanvasPointF pointF) { DrawMultilineText(text.RemoveReturns(), pointF.ToSKPoint(), GetSKPaint(font, (SKPaint)brush.EngineElement)); }
public void DrawLine(IPen pen, CanvasPointF p1, CanvasPointF p2) { _canvas?.DrawLine(p1.ToSKPoint(), p2.ToSKPoint(), GetSKPaint(pen)); }
public void TranslateTransform(CanvasPointF point) { CheckUsability(); _graphics.TranslateTransform(point.X, point.Y); }
public void DrawLine(IPen pen, CanvasPointF p1, CanvasPointF p2) { CheckUsability(); _graphics.DrawLine((Pen)pen.EngineElement, p1.ToGdiPointF(), p2.ToGdiPointF()); }
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); }
public void DrawBitmap(IBitmap bitmap, CanvasPointF pointF) { CheckUsability(); _graphics.DrawImage((Bitmap)bitmap.EngineElement, pointF.ToGdiPointF()); }