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:21


__path

__path: IPathCommandData

Defined in

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

Methods

beginPath

beginPath(): IPathCreator

Returns

IPathCreator

Overrides

IPathDrawer.beginPath

Defined in

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


moveTo

moveTo(x, y): IPathCreator

Parameters

NameType
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.moveTo

Defined in

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


lineTo

lineTo(x, y): IPathCreator

Parameters

NameType
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.lineTo

Defined in

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


bezierCurveTo

bezierCurveTo(x1, y1, x2, y2, x, y): IPathCreator

Parameters

NameType
x1number
y1number
x2number
y2number
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.bezierCurveTo

Defined in

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


quadraticCurveTo

quadraticCurveTo(x1, y1, x, y): IPathCreator

Parameters

NameType
x1number
y1number
xnumber
ynumber

Returns

IPathCreator

Overrides

IPathDrawer.quadraticCurveTo

Defined in

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


closePath

closePath(): IPathCreator

Returns

IPathCreator

Overrides

IPathDrawer.closePath

Defined in

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


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:32


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:33


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:34


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:36


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:37


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:40


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:41


drawPoints

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

Parameters

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

Returns

IPathCreator

Defined in

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


clearPath

clearPath(): IPathCreator

Returns

IPathCreator

Defined in

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

Released under the MIT License.