Implements

Constructors

  • Create a ColorState instance. Instead of creating an instance in new mode, use create to create an instance.

    Parameters

    • Optionaloptions: Options

      The options to create a ColorState instance.

    Returns ColorState

     const colorState = await ColorState.create();
    

Properties

options: Options

Methods

  • Destroys the PDF color state object.

    Returns Promise<void>

  • Tests whether the color state object is NULL or not.

    Returns Promise<boolean>

    • Non-zero means NULL, otherwise not NULL.
  • Sets the filling normal color.

    Parameters

    • clrSpace: ColorSpaceType

      The color space of the filling color.

    • value: number[]

      The color component values in the specified color space.

    Returns Promise<void>

  • Sets the stroking color.

    Parameters

    • clrSpace: ColorSpaceType

      The color space of the stroking color.

    • value: number[]

      The color component values in the specified color space.

    Returns Promise<void>

  • Creates a new empty PDF color state object.

    Parameters

    • Optionaloptions: Options

      The configuration options required for creation, including necessary initialization information.

    Returns Promise<ColorStateType>