Class Pen
Defines an object used to draw lines and curves.
public class Pen : HandledObject<IPenHandler>, IBaseObject, IDisposableObject, IDisposable, INotifyPropertyChanged, IEquatable<Pen>
- Inheritance
-
Pen
- Implements
Remarks
A Pen draws a line of specified width and style. Use the DashStyle property to draw several varieties of dashed lines.
Constructors
- Pen(Brush)
Initializes a new instance of the Pen class with the specified Brush.
- Pen(Color)
Initializes a new instance of the Pen class with the specified Color.
- Pen(Color, double)
Initializes a new instance of the Pen class with the specified Color and Width.
- Pen(Color, double, DashStyle)
Initializes a new instance of the Pen class with the specified Color, Width and DashStyle properties.
- Pen(Color, double, DashStyle, LineCap, LineJoin)
Initializes a new instance of the Pen class with the specified Color, Width and DashStyle properties.
Properties
- AsBrush
Creates SolidBrush with Color of this pen.
- Default
Gets the default pen.
- LineJoin
Specifies how to join consecutive line or curve segments.
- UpdateRequired
Gets whether handler update is required.
Methods
- CreateHandler()
Creates native pen.
- Equals(Pen?)
Indicates whether the current object is equal to another object of the same type.
- Equals(object?)
Determines whether the specified object is equal to the current object.
- GetHashCode()
Serves as the default hash function.
- ToString()
Returns a string that represents the current object.
- UpdateHandler()
Updates native pen.
Operators
- operator ==(Pen?, Pen?)
Returns a value that indicates whether the two objects are equal.
- operator !=(Pen?, Pen?)
Returns a value that indicates whether the two objects are not equal.