/// <summary>
        /// Update the shape with the given style information
        /// </summary>
        /// <param name="shape"></param>
        /// <param name="strokeStyle">Stroke Style Information</param>
        /// <param name="fillStyle">Fill Style Information</param>
        public static void UpdateShape(this Shape shape, StrokeStyle strokeStyle, FillStyle fillStyle)
        {
            if (strokeStyle != null)
            {
                shape.Stroke = strokeStyle.StrokeColor;
                shape.StrokeThickness = strokeStyle.Thickness;
                shape.StrokeStartLineCap = strokeStyle.StartLineCap;
                shape.StrokeEndLineCap = strokeStyle.EndLineCap;
                if (strokeStyle.DashStyle != null)
                {
                    shape.StrokeDashArray = strokeStyle.DashStyle.Dashes;
                    shape.StrokeDashOffset = strokeStyle.DashStyle.Offset;
                    shape.StrokeDashCap = strokeStyle.DashCap;
                }
            }

            if (fillStyle != null)
            {
                shape.Fill = fillStyle.FillColor;
            }
        }
Exemple #2
0
        /// <summary>
        /// Update the shape with the given style information
        /// </summary>
        /// <param name="shape"></param>
        /// <param name="strokeStyle">Stroke Style Information</param>
        /// <param name="fillStyle">Fill Style Information</param>
        public static void UpdateShape(this Shape shape, StrokeStyle strokeStyle, FillStyle fillStyle)
        {
            if (strokeStyle != null)
            {
                shape.Stroke             = strokeStyle.StrokeColor;
                shape.StrokeThickness    = strokeStyle.Thickness;
                shape.StrokeStartLineCap = strokeStyle.StartLineCap;
                shape.StrokeEndLineCap   = strokeStyle.EndLineCap;
                if (strokeStyle.DashStyle != null)
                {
                    shape.StrokeDashArray  = strokeStyle.DashStyle.Dashes;
                    shape.StrokeDashOffset = strokeStyle.DashStyle.Offset;
                    shape.StrokeDashCap    = strokeStyle.DashCap;
                }
            }

            if (fillStyle != null)
            {
                shape.Fill = fillStyle.FillColor;
            }
        }
Exemple #3
0
 public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle)
 {
     StrokeStyle = strokeStyle;
     FillStyle   = fillStyle;
 }
Exemple #4
0
 public ShapeStyle(FillStyle fillStyle)
 {
     FillStyle = fillStyle;
 }
Exemple #5
0
 public ShapeStyle()
 {
     StrokeStyle = new StrokeStyle();
     FillStyle   = new FillStyle();
 }
Exemple #6
0
 protected bool Equals(FillStyle other)
 {
     return(Equals(FillColor, other.FillColor));
 }
Exemple #7
0
 public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle)
 {
     StrokeStyle = strokeStyle;
     FillStyle = fillStyle;
 }
Exemple #8
0
 public ShapeStyle(FillStyle fillStyle)
 {
     FillStyle = fillStyle;
 }
Exemple #9
0
 public ShapeStyle()
 {
     StrokeStyle = new StrokeStyle();
     FillStyle = new FillStyle();
 }
Exemple #10
0
 protected bool Equals(FillStyle other)
 {
     return Equals(FillColor, other.FillColor);
 }
Exemple #11
0
 public static void UpdateShape(this Shape shape, FillStyle fillStyle)
 {
     UpdateShape(shape, null, fillStyle);
 }
Exemple #12
0
 public static void UpdateShape(this Shape shape, FillStyle fillStyle)
 {
     UpdateShape(shape, null, fillStyle);
 }