Skip to content

Interface: IPath2D

Hierarchy

  • CanvasPath

    IPath2D

Table of contents

Methods

Methods

addPath

addPath(path, transform?): void

Parameters

NameType
pathIPath2D
transform?DOMMatrix2DInit

Returns

void

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:14


arc

arc(x, y, radius, startAngle, endAngle, anticlockwise?): void

Parameters

NameType
xnumber
ynumber
radiusnumber
startAnglenumber
endAnglenumber
anticlockwise?boolean

Returns

void

Inherited from

CanvasPath.arc

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:88


arcTo

arcTo(x1, y1, x2, y2, radius): void

Parameters

NameType
x1number
y1number
x2number
y2number
radiusnumber

Returns

void

Inherited from

CanvasPath.arcTo

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:89


bezierCurveTo

bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y): void

Parameters

NameType
cp1xnumber
cp1ynumber
cp2xnumber
cp2ynumber
xnumber
ynumber

Returns

void

Inherited from

CanvasPath.bezierCurveTo

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:90


closePath

closePath(): void

Returns

void

Inherited from

CanvasPath.closePath

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:91


ellipse

ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise?): void

Parameters

NameType
xnumber
ynumber
radiusXnumber
radiusYnumber
rotationnumber
startAnglenumber
endAnglenumber
anticlockwise?boolean

Returns

void

Inherited from

CanvasPath.ellipse

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:92


lineTo

lineTo(x, y): void

Parameters

NameType
xnumber
ynumber

Returns

void

Inherited from

CanvasPath.lineTo

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:93


moveTo

moveTo(x, y): void

Parameters

NameType
xnumber
ynumber

Returns

void

Inherited from

CanvasPath.moveTo

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:94


quadraticCurveTo

quadraticCurveTo(cpx, cpy, x, y): void

Parameters

NameType
cpxnumber
cpynumber
xnumber
ynumber

Returns

void

Inherited from

CanvasPath.quadraticCurveTo

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:95


rect

rect(x, y, w, h): void

Parameters

NameType
xnumber
ynumber
wnumber
hnumber

Returns

void

Inherited from

CanvasPath.rect

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:96


roundRect

roundRect(x, y, width, height, radius?): void

Parameters

NameType
xnumber
ynumber
widthnumber
heightnumber
radius?number | number[]

Returns

void

Inherited from

CanvasPath.roundRect

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:97

Released under the MIT License.