Interface CanvasPath
interface CanvasPath {
arc(
x: number,
y: number,
radius: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void;
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
bezierCurveTo(
cp1x: number,
cp1y: number,
cp2x: number,
cp2y: number,
x: number,
y: number,
): void;
closePath(): void;
ellipse(
x: number,
y: number,
radiusX: number,
radiusY: number,
rotation: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void;
lineTo(x: number, y: number): void;
moveTo(x: number, y: number): void;
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
rect(x: number, y: number, w: number, h: number): void;
roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | (number | DOMPointInit)[],
): void;
roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | Iterable<number | DOMPointInit>,
): void;
}
arc(
x: number,
y: number,
radius: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void;
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
bezierCurveTo(
cp1x: number,
cp1y: number,
cp2x: number,
cp2y: number,
x: number,
y: number,
): void;
closePath(): void;
ellipse(
x: number,
y: number,
radiusX: number,
radiusY: number,
rotation: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void;
lineTo(x: number, y: number): void;
moveTo(x: number, y: number): void;
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
rect(x: number, y: number, w: number, h: number): void;
roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | (number | DOMPointInit)[],
): void;
roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | Iterable<number | DOMPointInit>,
): void;
}
Hierarchy
- CanvasPath (View Summary)
Index
Methods
arc
arcTo
bezierCurveTo
closePath
ellipse
- ellipse(
x: number,
y: number,
radiusX: number,
radiusY: number,
rotation: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void Parameters
- x: number
- y: number
- radiusX: number
- radiusY: number
- rotation: number
- startAngle: number
- endAngle: number
Optional
counterclockwise: boolean
Returns void
lineTo
moveTo
quadraticCurveTo
rect
roundRect
- roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | (number | DOMPointInit)[],
): void Parameters
- x: number
- y: number
- w: number
- h: number
Optional
radii: number | DOMPointInit | (number | DOMPointInit)[]
Returns void
- roundRect(
x: number,
y: number,
w: number,
h: number,
radii?: number | DOMPointInit | Iterable<number | DOMPointInit>,
): void Parameters
- x: number
- y: number
- w: number
- h: number
Optional
radii: number | DOMPointInit | Iterable<number | DOMPointInit>
Returns void
MDN Reference