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

    Class GraphicsPath

    Represents a path for drawing, filling, or clipping.

    Hierarchy (View Summary)

    Index

    Accessors

    • get figureHasSegments(): boolean

      Gets a value indicating if the active figure contains one or more segments.

      Returns boolean

    • get figureStarted(): boolean

      Gets a value indicating if there is an active figure to update.

      Returns boolean

    • get fillMode(): FillMode

      Gets or sets the method used to determine which points are inside the geometry described by this GraphicsPath and which points are outside.

      Returns FillMode

    • set fillMode(fillMode: FillMode): void

      Gets or sets the method used to determine which points are inside the geometry described by this GraphicsPath and which points are outside.

      Parameters

      Returns void

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get isClosed(): boolean

      Gets a value indicating if the path is closed for subsequent modifications.

      Returns boolean

    Methods

    • Creates a cubic Bezier curve between the current point and the specified end point.

      Parameters

      • xP1: number

        The X coordinate of the first control point for the Bezier segment.

      • yP1: number

        The Y coordinate of the first control point for the Bezier segment.

      • xP2: number

        The X coordinate of the second control point for the Bezier segment.

      • yP2: number

        The Y coordinate of the second control point for the Bezier segment.

      • xEndPoint: number

        The X coordinate of the end point for the Bezier segment.

      • yEndPoint: number

        The Y coordinate of the end point for the Bezier segment.

      Returns void

    • Adds an ellipse figure to the path. Note! The method calls the GraphicsPath#beginFigure and GraphicsPath#endFigure methods.

      Parameters

      • x: number

        The X coordinate of the rectangle enclosing an ellipse.

      • y: number

        The Y coordinate of the rectangle enclosing an ellipse.

      • width: number

        The width of the rectangle enclosing an ellipse.

      • height: number

        The height of the rectangle enclosing an ellipse.

      Returns void

    • Adds an ellipse figure to the path. Note! The method calls the GraphicsPath#beginFigure and GraphicsPath#endFigure methods.

      Parameters

      • bounds: Bounds

        The ellipse's bounds.

      Returns void

    • Creates a line segment between the current point and the specified end point.

      Parameters

      • x: number

        The X coordinate of the end point of the line to draw.

      • y: number

        The Y coordinate of the end point of the line to draw.

      Returns void

    • Creates a quadratic Bezier curve between the current point and the specified end point.

      Parameters

      • xP1: number

        The X coordinate of the control point for the quadratic Bezier segment.

      • yP1: number

        The Y coordinate of the control point for the quadratic Bezier segment.

      • xEndPoint: number

        The X coordinate of the end point for the quadratic Bezier segment.

      • yEndPoint: number

        The Y coordinate of the end point for the quadratic Bezier segment.

      Returns void

    • Adds a rectangular figure to the path. Note! The method calls the GraphicsPath#beginFigure and GraphicsPath#endFigure methods.

      Parameters

      • x: number

        The X coordinate of the rectangle.

      • y: number

        The Y coordinate of the rectangle.

      • width: number

        The width of the rectangle.

      • height: number

        The height of the rectangle.

      Returns void

    • Adds a rectangular figure to the path. Note! The method calls the GraphicsPath#beginFigure and GraphicsPath#endFigure methods.

      Parameters

      • bounds: Bounds

        The rectangle bounds.

      Returns void

    • Starts a new figure at the specified point.

      Parameters

      • x: number

        The X coordinate at which to begin the new figure.

      • y: number

        The Y coordinate at which to begin the new figure.

      Returns void

    • Discards the active figure.

      Returns void

    • Closes the path for modifications. The path cannot be modified after it is closed.

      Returns void

    • Ends the current figure; optionally, closes it.

      Parameters

      • closeFigure: boolean

        A value that indicates whether the current figure is closed. If the figure is closed, a line is drawn between the current point and the start point specified by GraphicsPath#beginFigure.

      Returns void

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

      Returns void

    • Returns a rectangle that bounds this GraphicsPath when it is transformed by the specified Transform.

      Parameters

      • Optionaltransform: Transform | null

        The transform to apply to this path before calculating its bounds.

      Returns Rect

      A rectangle that bounds this path.