Exemplo n.º 1
0
 public void BeginCappedLine(LineCapStyles startCap, Graphics.Size startSize, LineCapStyles endCap, Graphics.Size endSize,
                             SolidColor color, double width)
 {
     capLinePen = new Pen(new SolidColorBrush(color), width);
     capLinePen.StartLineCap = PlatformUtility.ToWPFLineCap(startCap);
     capLinePen.EndLineCap   = PlatformUtility.ToWPFLineCap(endCap);
 }
Exemplo n.º 2
0
        public void BeginCappedLine(LineCapStyles startStyle, Graphics.Size startSize,
                                    LineCapStyles endStyle, Graphics.Size endSize, SolidColor color, float width)
        {
            lineCap.StartStyle = startStyle;
            lineCap.StartSize  = startSize;
            lineCap.EndStyle   = endStyle;
            lineCap.EndSize    = endSize;
            lineCap.StartColor = color;
            lineCap.EndColor   = color;

            if ((startStyle == LineCapStyles.None && endStyle == LineCapStyles.None))
            {
                return;
            }

            PlatformGraphics.SmoothingMode = SmoothingMode.AntiAlias;

            if (cappedLinePen == null)
            {
                this.cappedLinePen = new Pen(color, width);
            }
            else
            {
                this.cappedLinePen.Color = color;
                this.cappedLinePen.Width = width;
            }

            if (startStyle == LineCapStyles.Arrow)
            {
                CreateArrowCap(ref this.cappedStartArrowCap, this.lineCap.StartSize);
                cappedLinePen.CustomStartCap = this.cappedStartArrowCap;
            }
            else
            {
                this.cappedLinePen.StartCap = System.Drawing.Drawing2D.LineCap.NoAnchor;
            }

            if (endStyle == LineCapStyles.Arrow)
            {
                CreateArrowCap(ref this.cappedEndArrowCap, this.lineCap.EndSize);
                cappedLinePen.CustomEndCap = this.cappedEndArrowCap;
            }
            else
            {
                this.cappedLinePen.EndCap = System.Drawing.Drawing2D.LineCap.NoAnchor;
            }
        }
Exemplo n.º 3
0
 public void BeginCappedLine(LineCapStyles startCap, Size startSize, LineCapStyles endCap, Size endSize, SolidColor color)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public void BeginCappedLine(LineCapStyles startCap, Size startSize, LineCapStyles endCap, Size endSize, SolidColor color)
 {
 }