コード例 #1
0
ファイル: ShapeExtensions.cs プロジェクト: CHiiLD/net-toolkit
        /// <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
ファイル: Styles.cs プロジェクト: CHiiLD/net-toolkit
 public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle)
 {
     StrokeStyle = strokeStyle;
     FillStyle = fillStyle;
 }
コード例 #8
0
ファイル: Styles.cs プロジェクト: CHiiLD/net-toolkit
 public ShapeStyle(FillStyle fillStyle)
 {
     FillStyle = fillStyle;
 }
コード例 #9
0
ファイル: Styles.cs プロジェクト: CHiiLD/net-toolkit
 public ShapeStyle()
 {
     StrokeStyle = new StrokeStyle();
     FillStyle = new FillStyle();
 }
コード例 #10
0
ファイル: Styles.cs プロジェクト: CHiiLD/net-toolkit
 protected bool Equals(FillStyle other)
 {
     return Equals(FillColor, other.FillColor);
 }
コード例 #11
0
ファイル: ShapeExtensions.cs プロジェクト: CHiiLD/net-toolkit
 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);
 }