Exemple #1
0
        public override void OnDraw(object dc, double zoom)
        {
            var canvas = dc as SKCanvas;

            if (Line.IsStroked)
            {
                if (Style.LineStyle.IsCurved)
                {
                    canvas.DrawPath(CurveGeometry, Stroke);
                }
                else
                {
                    canvas.DrawLine(P0, P1, Stroke);
                }

                if (Style.StartArrowStyle.ArrowType != ArrowType.None)
                {
                    StartMarker?.Draw(dc);
                }

                if (Style.EndArrowStyle.ArrowType != ArrowType.None)
                {
                    EndMarker?.Draw(dc);
                }
            }
        }
Exemple #2
0
        public override void OnDraw(object dc, double zoom)
        {
            var context = dc as AM.DrawingContext;

            if (Line.IsStroked)
            {
                if (Style.LineStyle.IsCurved)
                {
                    context.DrawGeometry(null, Stroke, CurveGeometry);
                }
                else
                {
                    context.DrawLine(Stroke, P0, P1);
                }

                if (Style.StartArrowStyle.ArrowType != ArrowType.None)
                {
                    StartMarker?.Draw(dc);
                }

                if (Style.EndArrowStyle.ArrowType != ArrowType.None)
                {
                    EndMarker?.Draw(dc);
                }
            }
        }
Exemple #3
0
        public override void OnDraw(object dc, double zoom)
        {
            var canvas = dc as SKCanvas;

            if (Line.IsStroked)
            {
                canvas.DrawLine(P0, P1, Stroke);

                if (Style.Stroke.StartArrow.ArrowType != ArrowType.None)
                {
                    StartMarker?.Draw(dc);
                }

                if (Style.Stroke.EndArrow.ArrowType != ArrowType.None)
                {
                    EndMarker?.Draw(dc);
                }
            }
        }
Exemple #4
0
        public override void OnDraw(object dc, double zoom)
        {
            var context = dc as AM.DrawingContext;

            if (Line.IsStroked)
            {
                context.DrawLine(Stroke, P0, P1);

                if (Style.Stroke.StartArrow.ArrowType != ArrowType.None)
                {
                    StartMarker?.Draw(dc);
                }

                if (Style.Stroke.EndArrow.ArrowType != ArrowType.None)
                {
                    EndMarker?.Draw(dc);
                }
            }
        }