Type Alias RectangleMask

RectangleMask: Readonly<{
    color: HighlightColor;
    height: number;
    type: "rectangle-mask";
    width: number;
    x: number;
    y: number;
}>

Represents a rectangular mask applied at the PNG level, i.e., after the conversion of the PDF to an image.

Type declaration

  • color: HighlightColor

    The color used for the mask.

  • height: number

    The height of the rectangle in pixels.

  • type: "rectangle-mask"
  • width: number

    The width of the rectangle in pixels.

  • x: number

    The x-coordinate of the top-left corner of the rectangle in pixels.

  • y: number

    The y-coordinate of the top-left corner of the rectangle in pixels.

The values provided for x, y, width, and height are expected to be in pixels and based on the generated image by the library. The origin (0,0) of the PNG's coordinate system is the top-left corner of the image.