Optional borderThe color of the highlight border in rgba, hex, or named color format.
If not specified, defaults to 'rgba(255, 165, 0, 0.75)'.
Optional borderThe width of the highlight border in pixels. If not specified, defaults to 2 pixels.
Optional colorThe fill color of the highlight in rgba, hex, or named color format.
If not specified, defaults to 'rgba(255, 255, 0, 0.5)'.
Optional paintA custom function to handle the painting of the highlight.
The rendering context of the canvas to draw on.
The highlight object containing details for painting.
An array of rectangles that specify the position and dimensions of the highlight areas on the page. Each rectangle can be defined in one of two formats:
Object format:
{ x: number, y: number, w: number, h: number }x and y represent the coordinates of the rectangle's bottom-left corner.w (width) represents the horizontal size of the rectangle, extending to the right from x.h (height) represents the vertical size of the rectangle, extending upwards from y.Array format:
[x1: number, y1: number, x2: number, y2: number]x1 and y1 represent the coordinates of the rectangle's bottom-left corner.x2 and y2 represent the coordinates of the rectangle's top-right corner.Coordinate System:
x and y increase to the right and upwards, respectively.w) extends to the right from the x position, and height (h) extends upwards from the y position.Optional textThe text content associated with the highlight.
Represents a custom highlight within a document.