public WindowsPen(DeviceContext dc, WindowsPenStyle style, int width, WindowsBrush windowsBrush) { Debug.Assert(windowsBrush != null, "null windowsBrush"); this.style = style; this.wndBrush = (WindowsBrush)windowsBrush.Clone(); this.width = width; this.color = windowsBrush.Color; this.dc = dc; // CreatePen() created on demand. }
public object Clone() { return((wndBrush != null) ? new WindowsPen(dc, style, width, (WindowsBrush)wndBrush.Clone()) : new WindowsPen(dc, style, width, color)); }
public WindowsPen(DeviceContext dc, WindowsPenStyle style, int width, WindowsBrush windowsBrush ) { Debug.Assert(windowsBrush != null, "null windowsBrush" ); this.style = style; this.wndBrush = (WindowsBrush) windowsBrush.Clone(); this.width = width; this.color = windowsBrush.Color; this.dc = dc; // CreatePen() created on demand. }