DsPdfJS API - v9.1.0
    Preparing search index...

    Class Pen

    Represents a pen used to draw lines and contours.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new Pen based on properties of an existing Pen.

      Parameters

      • penProperties: PenProperties

        The settings overriding properties of the base Pen.

      Returns Pen

    • Creates a new Pen based on properties of an existing Pen.

      Parameters

      • basePen: Pen

        The Pen used as the base for the new Pen.

      • penProperties: PenProperties

        The settings overriding properties of the base Pen.

      Returns Pen

    • Creates a new Pen object with specified properties.

      Parameters

      Returns Pen

    Accessors

    • get color(): Color

      Gets the pen color.

      Returns Color

    • get dashOffset(): number

      Gets the distance within the dash pattern where a dash begins.

      Returns number

    • get dashPattern(): number[] | null

      Gets the custom dash pattern of lines drawn with this pen.

      Returns number[] | null

    • get dashStyle(): DashStyle

      Gets the style of dashed lines drawn with this pen.

      Returns DashStyle

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get lineCap(): PenLineCap

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

      Returns PenLineCap

    • get lineJoin(): PenLineJoin

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

      Returns PenLineJoin

    • get miterLimit(): number

      Gets 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.

      Returns number

    • get width(): number

      Gets the pen width, in units used for drawing.

      Returns number

    Methods

    • Detaches the object from the ObjectManager and deallocates its memory, if possible.

      Returns void