Skip to content

Interface: IPathCreator

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

path

path: IPathCommandData

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:20


__path

__path: IPathCommandData

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:21

Methods

beginPath

beginPath(): IPathCreator

Returns

IPathCreator

Overrides

IPathDrawer.beginPath

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:23


moveTo

moveTo(x, y): IPathCreator

Parameters

NameType
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.moveTo

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:25


lineTo

lineTo(x, y): IPathCreator

Parameters

NameType
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.lineTo

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:26


bezierCurveTo

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

Parameters

NameType
cp1xnumber
cp1ynumber
cp2xnumber
cp2ynumber
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.bezierCurveTo

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:27


quadraticCurveTo

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

Parameters

NameType
cpxnumber
cpynumber
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.quadraticCurveTo

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:28


closePath

closePath(): IPathCreator

Returns

IPathCreator

Overrides

IPathDrawer.closePath

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:29


arc

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

Parameters

NameType
xnumber
ynumber
radiusnumber
startAngle?number
endAngle?number
anticlockwise?boolean

Returns

IPathCreator

Overrides

IPathDrawer.arc

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:31


arcTo

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

Parameters

NameType
x1number
y1number
x2number
y2number
radiusnumber

Returns

IPathCreator

Overrides

IPathDrawer.arcTo

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:32


ellipse

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

Parameters

NameType
xnumber
ynumber
radiusXnumber
radiusYnumber
rotation?number
startAngle?number
endAngle?number
anticlockwise?boolean

Returns

IPathCreator

Overrides

IPathDrawer.ellipse

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:33


rect

rect(x, y, width, height): IPathCreator

Parameters

NameType
xnumber
ynumber
widthnumber
heightnumber

Returns

IPathCreator

Overrides

IPathDrawer.rect

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:35


roundRect

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

Parameters

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

Returns

IPathCreator

Overrides

IPathDrawer.roundRect

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:36


drawEllipse

drawEllipse(x, y, radiusX, radiusY, rotation?, startAngle?, endAngle?, anticlockwise?): IPathCreator

Parameters

NameType
xnumber
ynumber
radiusXnumber
radiusYnumber
rotation?number
startAngle?number
endAngle?number
anticlockwise?boolean

Returns

IPathCreator

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:39


drawArc

drawArc(x, y, radius, startAngle?, endAngle?, anticlockwise?): IPathCreator

Parameters

NameType
xnumber
ynumber
radiusnumber
startAngle?number
endAngle?number
anticlockwise?boolean

Returns

IPathCreator

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:40


drawPoints

drawPoints(points, curve?, close?): IPathCreator

Parameters

NameType
pointsnumber[]
curve?number | boolean
close?boolean

Returns

IPathCreator

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:41


clearPath

clearPath(): IPathCreator

Returns

IPathCreator

Defined in

leafer/packages/interface/src/path/IPathDrawer.ts:43

Released under the MIT License.