[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.Pen

Class Pen

Namespace
GrapeCity.Documents.Drawing
Assembly
GcDocs.Imaging.dll

Represents an object used to draw lines and curves.

public class Pen
Inheritance
object
Pen
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Pen(Pen)

Creates a copy of a Pen object.

public Pen(Pen source)

Parameters

source Pen

Pen(Color, float)

Initializes a new instance of a Pen.

public Pen(Color color, float width)

Parameters

color System.Drawing.Color

Color of the lines drawn with this pen.

width float

Width of the lines drawn with this pen, in units of the Graphics object used for drawing.

Pen(Color)

Initializes a new instance of a Pen.

public Pen(Color color)

Parameters

color System.Drawing.Color

Color of the lines drawn with this pen.

Properties

Color

Gets or sets the pen color.

public Color Color { get; set; }

Property Value

System.Drawing.Color

DashOffset

Gets or sets the distance within the dash pattern where a dash begins. The default value is 0.

public float DashOffset { get; set; }

Property Value

float

DashPattern

Gets or sets the custom dash pattern of lines drawn with this pen. Setting this to a non-null value resets the DashStyle.

public float[] DashPattern { get; set; }

Property Value

float[]

DashStyle

Gets or sets the style of dashed lines drawn with this pen. Setting this to anything other than custom resets the DashPattern.

public DashStyle DashStyle { get; set; }

Property Value

DashStyle

LineCap

Gets or sets the line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.

public PenLineCap LineCap { get; set; }

Property Value

PenLineCap

LineJoin

Gets or sets the line join style specifies the shape to be used at the corners of paths that are stroked.

public PenLineJoin LineJoin { get; set; }

Property Value

PenLineJoin

MiterLimit

Gets or sets a maximum on the ratio of the miter length to the pen width. When the limit is exceeded, the join is converted from a miter to a bevel.

public float MiterLimit { get; set; }

Property Value

float

Visible

Gets a value indicating whether the pen is really visible, i.e. its width greater than 0 and color is not transparent.

public bool Visible { get; }

Property Value

bool

Width

Gets or sets the pen width, in units of the Graphics object used for drawing.

public float Width { get; set; }

Property Value

float

Operators

implicit operator Pen(Color)

Implicitly converts a Color to a Pen.

public static implicit operator Pen(Color color)

Parameters

color System.Drawing.Color

The Color value.

Returns

Pen

A Pen with the specified color.