Skip to content

CanvasPath

Path to draw on the canvas.

Properties

drawMode

readonly drawMode: boolean

Whether the path is a draw mode or erase mode.

Source

packages/react-sketch-canvas/src/types/canvas.ts:56


endTimestamp?

optional readonly endTimestamp: number

The timestamp when the path was last updated. This is used to determine the order of the paths.

Remarks

This will only be set when the withTimestamp option is set to true.

Source

packages/react-sketch-canvas/src/types/canvas.ts:70


paths

readonly paths: Point[]

The paths to draw. Each path is an array of points.

Source

packages/react-sketch-canvas/src/types/canvas.ts:44


startTimestamp?

optional readonly startTimestamp: number

The timestamp when the path was created. This is used to determine the order of the paths.

Remarks

This will only be set when the withTimestamp option is set to true.

Source

packages/react-sketch-canvas/src/types/canvas.ts:63


strokeColor

readonly strokeColor: string

Color of the stroke.

Source

packages/react-sketch-canvas/src/types/canvas.ts:52


strokeWidth

readonly strokeWidth: number

The stroke width of the path.

Source

packages/react-sketch-canvas/src/types/canvas.ts:48