Pen
System.Drawing.Pen
Namespace: System.Drawing
Assembly: System.Drawing.Managed (4.0.0.0)
Defines an object used to draw lines and curves. This class cannot be inherited.
public class Pen : MarshalByRefObject, ICloneable, IDisposablePublic Class Pen
Inherits MarshalByRefObject
Implements ICloneable, IDisposableConstructors
Pen(brush)
Initializes a new instance of the Pen class with the specified Brush.
Throws:
ArgumentNullException brush is null.
Pen(color)
Initializes a new instance of the Pen class with the specified Brush.
Pen(brush, width)
Initializes a new instance of the Pen class with the specified.Color.
Throws:
ArgumentNullException brush is null.
Pen(color, width)
Initializes a new instance of the Pen class with the specified.Color.
Properties
Alignment
PenAlignment: Gets or sets a PenAlignment that represents the alignment for this Pen.
Brush
Brush: Gets or sets the Brush that determines attributes of this Pen.
Color
Color: Gets or sets the color of this Pen.
DashOffset
Single: Gets or sets the distance from the start of a line to the beginning of a dash pattern.
DashPattern
Single[]: Gets or sets an array of custom dashes and spaces.
DashStyle
DashStyle: Gets or sets the style used for dashed lines drawn with this Pen.
EndCap
LineCap: Gets or sets the cap style used at the end of lines drawn with this Pen.
LineJoin
LineJoin: Gets or sets the join style for the ends of two overlapping lines drawn with this Pen.
MiterLimit
Single: Gets or sets the limit of the thickness of the join on a mitered corner.
PenType
PenType: Gets the style of lines drawn with this Pen.
Transform
Matrix: Gets or sets a copy of the geometric transformation for this Pen.
Width
Single: Gets or sets the width of this Pen, in units of the Graphics object used for drawing.
Methods
Clone()
Returns: Object.
Dispose()
Finalize()
Finalizes an instance of the Pen class.
Last updated
Was this helpful?