Example #1
0
        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);
        }
Example #2
0
        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);
            }
        }
Example #3
0
        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);
        }