Defines attributes for line drawing methods in Graphics

Constructors

Pen

#
public Pen(Brush brush, float thickness = 1)
Creates a new pen with the specified brush and thickness
brush (Brush)Brush to stroke the pen with.
thickness (float = 1)Thickness of the new pen

Pen

#
public Pen(Color color, float thickness = 1)
Creates a new pen with the specified color and thickness
color (Color)Color for the new pen
thickness (float = 1)Thickness of the new pen

Properties

Brush

#
public Brush Brush { get; }
Gets the brush associated with the pen.

Color

#
public Color Color { get; set; }
obsolete, Use Brush property instead
Gets or sets the color of the pen

ControlObject

#
public object ControlObject { get; set; }
Gets the control object for this widget

DashStyle

#
public DashStyle DashStyle { get; set; }
Gets or sets the dash style of the pen

Handler

#
public object Handler { get; }
Gets the platform handler object for the widget

Instantiator

#
public static Func<Color, float, Pen> Instantiator { get; }
obsolete, use new Pen() instead.
Gets a delegate that can be used to create instances of the Pen with low overhead

LineCap

#
public PenLineCap LineCap { get; set; }
Gets or sets the line cap style of the pen

LineJoin

#
public PenLineJoin LineJoin { get; set; }
Gets or sets the line join style of the pen

MiterLimit

#
public float MiterLimit { get; set; }
Gets or sets the miter limit on the ratio of the length vs. the Thickness of this pen

Thickness

#
public float Thickness { get; set; }
Gets or sets the thickness (width) of the pen

Methods

Dispose

#
public void Dispose()
Releases all resource used by the Pen object.
Remarks: Call Dispose() when you are finished using the Pen. The Dispose() method leaves the Pen in an unusable state. After calling Dispose(), you must release all references to the Pen so the garbage collector can reclaim the memory that the Pen was occupying.