Example #1
0
 public Brush CreateBrush(bool swapColors)
 {
     if (!swapColors)
     {
         return(BrushInfo.CreateBrush(PrimaryColor.ToColor(), SecondaryColor.ToColor()));
     }
     else
     {
         return(BrushInfo.CreateBrush(SecondaryColor.ToColor(), PrimaryColor.ToColor()));
     }
 }
Example #2
0
 public Pen CreatePen(BrushInfo brushInfo, Color foreColor, Color backColor)
 {
     if (brushInfo.BrushType == BrushType.None)
     {
         return(new Pen(foreColor, width));
     }
     else
     {
         return(new Pen(brushInfo.CreateBrush(foreColor, backColor), width));
     }
 }
Example #3
0
        public Pen CreatePen(BrushInfo brushInfo, Color foreColor, Color backColor)
        {
            Pen pen;

            if (brushInfo.BrushType == BrushType.None)
            {
                pen = new Pen(foreColor, width);
            }
            else
            {
                pen = new Pen(brushInfo.CreateBrush(foreColor, backColor), width);
            }

            LineCap       startLineCap;
            CustomLineCap startCustomLineCap;

            LineCapToLineCap2(this.startCap, out startLineCap, out startCustomLineCap);

            if (startCustomLineCap != null)
            {
                pen.CustomStartCap = startCustomLineCap;
            }
            else
            {
                pen.StartCap = startLineCap;
            }

            LineCap       endLineCap;
            CustomLineCap endCustomLineCap;

            LineCapToLineCap2(this.endCap, out endLineCap, out endCustomLineCap);

            if (endCustomLineCap != null)
            {
                pen.CustomEndCap = endCustomLineCap;
            }
            else
            {
                pen.EndCap = endLineCap;
            }

            pen.DashStyle = this.dashStyle;

            return(pen);
        }
Example #4
0
        public Pen CreatePen(BrushInfo brushInfo, Color foreColor, Color backColor)
        {
            Pen pen;

            if (brushInfo.BrushType == BrushType.None)
            {
                pen = new Pen(foreColor, width);
            }
            else
            {
                pen = new Pen(brushInfo.CreateBrush(foreColor, backColor), width);
            }

            LineCap startLineCap;
            CustomLineCap startCustomLineCap;
            LineCapToLineCap2(this.startCap, out startLineCap, out startCustomLineCap);

            if (startCustomLineCap != null)
            {
                pen.CustomStartCap = startCustomLineCap;
            }
            else
            {
                pen.StartCap = startLineCap;
            }

            LineCap endLineCap;
            CustomLineCap endCustomLineCap;
            LineCapToLineCap2(this.endCap, out endLineCap, out endCustomLineCap);

            if (endCustomLineCap != null)
            {
                pen.CustomEndCap = endCustomLineCap;
            }
            else
            {
                pen.EndCap = endLineCap;
            }

            pen.DashStyle = this.dashStyle;

            return pen;
        }
Example #5
0
 public Pen CreatePen(BrushInfo brushInfo, Color foreColor, Color backColor)
 {
     if (brushInfo.BrushType == BrushType.None)
     {
         return new Pen(foreColor, width);
     }
     else
     {
         return new Pen(brushInfo.CreateBrush(foreColor, backColor), width);
     }
 }