[]
Represents an object used to draw lines and curves.
public class Pen
Creates a copy of a Pen object.
public Pen(Pen source)
source
PenInitializes a new instance of a Pen.
public Pen(Color color, float width)
color
System.Drawing.ColorColor of the lines drawn with this pen.
width
floatWidth of the lines drawn with this pen, in units of the Graphics object used for drawing.
Initializes a new instance of a Pen.
public Pen(Color color)
color
System.Drawing.ColorColor of the lines drawn with this pen.
Gets or sets the pen color.
public Color Color { get; set; }
Gets or sets the distance within the dash pattern where a dash begins. The default value is 0.
public float DashOffset { get; set; }
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; }
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; }
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; }
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; }
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; }
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; }
Gets or sets the pen width, in units of the Graphics object used for drawing.
public float Width { get; set; }
public static implicit operator Pen(Color color)
color
System.Drawing.ColorThe Color value.