public void FillPolygon(PointF[] points, FillMode fillMode) { if (Brush == null) { return; } var frame = Target.Frame(); if (frame == null) { return; } var color = Brush.Color.ToArgb(); SdfDraw.FillPolygon(frame, points, color, fillMode); }
public void FillGlyphs(IEnumerable <RenderableGlyph> positionedGlyphs, Brush brush) { if (Brush == null) { return; } var frame = Target.Frame(); if (frame == null) { return; } var color = brush.GetBrush(Toolkit).Color.ToArgb(); foreach (var glyph in positionedGlyphs) { SdfDraw.FillPolygon(frame, glyph.ToArray(), color, FillMode.Winding); } }
public void DrawLine(float x1, float y1, float x2, float y2) { if (Pen == null) { return; } var frame = Target.Frame(); if (frame == null) { return; } var thickness = Pen.Pen.Width; var color = Pen.Pen.Color.ToArgb(); // Very, very stupid line drawing SdfDraw.DrawLine(frame, thickness, x1, y1, x2, y2, color); }