private void RecreatePen() { if (Stroke == null) { _pen = null; } else { var brush = Stroke.CloneCurrentValue(); brush.Freeze(); _pen = new Pen(brush, StrokeThickness); _pen.StartLineCap = StrokeLineCap; _pen.EndLineCap = StrokeLineCap; _pen.DashStyle = new DashStyle(StrokeDashArray, StrokeDashOffset); _pen.DashCap = StrokeDashCap; _pen.Freeze(); } }
public Character Clone(VisualObject owner, int index) => new Character(owner, Creator ?? Owner, index, Geometry?.CloneCurrentValue(), Fill?.CloneCurrentValue(), Stroke?.CloneCurrentValue(), SelectionFill?.CloneCurrentValue(), SelectionStroke?.CloneCurrentValue(), Transform, IsTransformed, IsHitTestVisible, Data);
public Character Clone() => new Character(Owner, Creator, Index, Geometry?.CloneCurrentValue(), Fill?.CloneCurrentValue(), Stroke?.CloneCurrentValue(), SelectionFill?.CloneCurrentValue(), SelectionStroke?.CloneCurrentValue(), Transform, IsTransformed, IsHitTestVisible, Data);