registerFigure(figure) â
registerFigure
used to custom figure.
Reference â
typescript
(
overlay: {
name: string
draw: (ctx: CanvasRenderingContext2D, attrs: any, styles: object) => void
checkEventOn: (coordinate: Coordinate, attrs: any, styles: object) => boolean
}
) => void
Parameters â
figure
Figure configuration.name
Name, unique identifier.draw
Drawing method.checkEventOn
Checks if the event is on a figure.
Returns â
registerFigure
returns undefined
ã