GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    Pen Class

    Namespace:
    GemBox.Document.Drawing
    Assembly:
    GemBox.Document.dll

    Represents a type which describes how a shape is outlined.

    • C#
    • VB.NET
    public sealed class Pen
    Public NotInheritable Class Pen
    Inheritance:
    System.Object
    Pen

    Properties

    CompoundType

    Gets or sets the compound line type.

    • C#
    • VB.NET
    public PenCompoundType CompoundType { get; set; }
    Public Property CompoundType As PenCompoundType
    Property Value
    PenCompoundType

    The compound line type.

    Remarks

    CompoundType is currently not supported when exporting a document to PDF, XPS, or image formats.

    DashType

    Gets or sets the dash type.

    • C#
    • VB.NET
    public PenDashType DashType { get; set; }
    Public Property DashType As PenDashType
    Property Value
    PenDashType

    The dash type.

    Fill

    Gets the fill of the outline produced by this Pen.

    • C#
    • VB.NET
    public Brush Fill { get; }
    Public ReadOnly Property Fill As Brush
    Property Value
    Brush

    The fill of the outline produced by this Pen.

    JoinType

    Gets or sets the line join type that indicates how connected lines are joined.

    Default value is Round.

    • C#
    • VB.NET
    public PenJoinType JoinType { get; set; }
    Public Property JoinType As PenJoinType
    Property Value
    PenJoinType

    The line join type that indicates how connected lines are joined.

    Width

    Gets or sets the thickness of the stroke produced by this Pen.

    • C#
    • VB.NET
    public double Width { get; set; }
    Public Property Width As Double
    Property Value
    System.Double

    The thickness of the stroke produced by this Pen.

    Exceptions
    System.ArgumentOutOfRangeException

    Value cannot be negative.

    Methods

    ToString()

    Returns a System.String that represents this Pen instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this Pen instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Examples

    Shapes example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.