CanvasDrawPath
interface CanvasDrawPath {
beginPath(): void;
clip(fillRule?: CanvasFillRule): void;
clip(path: Path2D, fillRule?: CanvasFillRule): void;
fill(fillRule?: CanvasFillRule): void;
fill(path: Path2D, fillRule?: CanvasFillRule): void;
isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
isPointInPath(
path: Path2D,
x: number,
y: number,
fillRule?: CanvasFillRule,
): boolean;
isPointInStroke(x: number, y: number): boolean;
isPointInStroke(path: Path2D, x: number, y: number): boolean;
stroke(): void;
stroke(path: Path2D): void;
}
beginPath(): void;
clip(fillRule?: CanvasFillRule): void;
clip(path: Path2D, fillRule?: CanvasFillRule): void;
fill(fillRule?: CanvasFillRule): void;
fill(path: Path2D, fillRule?: CanvasFillRule): void;
isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
isPointInPath(
path: Path2D,
x: number,
y: number,
fillRule?: CanvasFillRule,
): boolean;
isPointInStroke(x: number, y: number): boolean;
isPointInStroke(path: Path2D, x: number, y: number): boolean;
stroke(): void;
stroke(path: Path2D): void;
}
Hierarchy (View Summary)
Index
Methods
Methods
begin Path
beginPath(): voidReturns void
clip
clip(fillRule?: CanvasFillRule): voidclip(path: Path2D, fillRule?: CanvasFillRule): voidParameters
path: Path2DOptionalfillRule: CanvasFillRule
Returns void
fill
fill(fillRule?: CanvasFillRule): voidfill(path: Path2D, fillRule?: CanvasFillRule): voidParameters
path: Path2DOptionalfillRule: CanvasFillRule
Returns void
is Point In Path
isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): booleanisPointInPath(
path: Path2D,
x: number,
y: number,
fillRule?: CanvasFillRule,
): booleanParameters
path: Path2Dx: numbery: numberOptionalfillRule: CanvasFillRule
Returns boolean
is Point In Stroke
isPointInStroke(x: number, y: number): booleanstroke
stroke(): void
MDN Reference