예제 #1
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;
            }
        }
예제 #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;
            }
        }
예제 #3
0
 public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle)
 {
     StrokeStyle = strokeStyle;
     FillStyle   = fillStyle;
 }
예제 #4
0
 public ShapeStyle(FillStyle fillStyle)
 {
     FillStyle = fillStyle;
 }
예제 #5
0
 public ShapeStyle()
 {
     StrokeStyle = new StrokeStyle();
     FillStyle   = new FillStyle();
 }
예제 #6
0
 protected bool Equals(FillStyle other)
 {
     return(Equals(FillColor, other.FillColor));
 }
예제 #7
0
 public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle)
 {
     StrokeStyle = strokeStyle;
     FillStyle = fillStyle;
 }
예제 #8
0
 public ShapeStyle(FillStyle fillStyle)
 {
     FillStyle = fillStyle;
 }
예제 #9
0
 public ShapeStyle()
 {
     StrokeStyle = new StrokeStyle();
     FillStyle = new FillStyle();
 }
예제 #10
0
 protected bool Equals(FillStyle other)
 {
     return Equals(FillColor, other.FillColor);
 }
예제 #11
0
 public static void UpdateShape(this Shape shape, FillStyle fillStyle)
 {
     UpdateShape(shape, null, fillStyle);
 }
예제 #12
0
 public static void UpdateShape(this Shape shape, FillStyle fillStyle)
 {
     UpdateShape(shape, null, fillStyle);
 }