Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

interface export

PainterHitDetect

Grouped hit-testing API: `await painter.detect.path(…)`, `.region(…)`, etc.

apexify.jsCURRENTnode22node24node26
Source: lib-next/types/painter-facets.ts (opens in a new tab)

Signature

TypeScript
export interface PainterHitDetect {
    path(path: Path2D | PathCommand[], x: number, y: number, options?: HitDetectionOptions): Promise<HitDetectionResult>;
    region(region: HitRegion, x: number, y: number, options?: HitDetectionOptions): Promise<HitDetectionResult>;
    anyRegion(regions: HitRegion[], x: number, y: number, options?: HitDetectionOptions): Promise<HitDetectionResult>;
    distance(region: HitRegion, x: number, y: number): Promise<number>;
}

Related APIs

No explicit related API metadata.

Next steps