/// <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; } }
public ShapeStyle(StrokeStyle strokeStyle, FillStyle fillStyle) { StrokeStyle = strokeStyle; FillStyle = fillStyle; }
public ShapeStyle(StrokeStyle strokeStyle) { StrokeStyle = strokeStyle; }
public ShapeStyle() { StrokeStyle = new StrokeStyle(); FillStyle = new FillStyle(); }
protected bool Equals(StrokeStyle other) { return Thickness.Equals(other.Thickness) && Equals(StrokeColor, other.StrokeColor) && Equals(DashStyle, other.DashStyle) && DashCap.Equals(other.DashCap) && StartLineCap.Equals(other.StartLineCap) && EndLineCap.Equals(other.EndLineCap) && LineJoin.Equals(other.LineJoin); }
public static void UpdateShape(this Shape shape, StrokeStyle strokeStyle) { UpdateShape(shape, strokeStyle, null); }