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