Skip to content

Class: PathCreator

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new PathCreator(path?): PathCreator

Parameters

NameType
path?string | IPathCommandData

Returns

PathCreator

Defined in

leafer/packages/path/src/PathCreator.ts:15

Properties

__path

__path: IPathCommandData

Implementation of

IPathCreator.__path

Defined in

leafer/packages/path/src/PathCreator.ts:13

Accessors

path

get path(): IPathCommandData

Returns

IPathCommandData

Implementation of

IPathCreator.path

Defined in

leafer/packages/path/src/PathCreator.ts:11

set path(value): void

Parameters

NameType
valueIPathCommandData

Returns

void

Implementation of

IPathCreator.path

Defined in

leafer/packages/path/src/PathCreator.ts:10

Methods

set

set(path?): PathCreator

Parameters

NameType
path?string | IPathCommandData

Returns

PathCreator

Defined in

leafer/packages/path/src/PathCreator.ts:19


beginPath

beginPath(): PathCreator

Returns

PathCreator

Implementation of

IPathCreator.beginPath

Defined in

leafer/packages/path/src/PathCreator.ts:28


moveTo

moveTo(x, y): PathCreator

Parameters

NameType
xnumber
ynumber

Returns

PathCreator

Implementation of

IPathCreator.moveTo

Defined in

leafer/packages/path/src/PathCreator.ts:36


lineTo

lineTo(x, y): PathCreator

Parameters

NameType
xnumber
ynumber

Returns

PathCreator

Implementation of

IPathCreator.lineTo

Defined in

leafer/packages/path/src/PathCreator.ts:42


bezierCurveTo

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

Parameters

NameType
x1number
y1number
x2number
y2number
xnumber
ynumber

Returns

PathCreator

Implementation of

IPathCreator.bezierCurveTo

Defined in

leafer/packages/path/src/PathCreator.ts:48


quadraticCurveTo

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

Parameters

NameType
x1number
y1number
xnumber
ynumber

Returns

PathCreator

Implementation of

IPathCreator.quadraticCurveTo

Defined in

leafer/packages/path/src/PathCreator.ts:54


closePath

closePath(): PathCreator

Returns

PathCreator

Implementation of

IPathCreator.closePath

Defined in

leafer/packages/path/src/PathCreator.ts:60


rect

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

Parameters

NameType
xnumber
ynumber
widthnumber
heightnumber

Returns

PathCreator

Implementation of

IPathCreator.rect

Defined in

leafer/packages/path/src/PathCreator.ts:68


roundRect

roundRect(x, y, width, height, cornerRadius): PathCreator

Parameters

NameType
xnumber
ynumber
widthnumber
heightnumber
cornerRadiusnumber | number[]

Returns

PathCreator

Implementation of

IPathCreator.roundRect

Defined in

leafer/packages/path/src/PathCreator.ts:74


ellipse

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

Parameters

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

Returns

PathCreator

Implementation of

IPathCreator.ellipse

Defined in

leafer/packages/path/src/PathCreator.ts:80


arc

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

Parameters

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

Returns

PathCreator

Implementation of

IPathCreator.arc

Defined in

leafer/packages/path/src/PathCreator.ts:86


arcTo

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

Parameters

NameType
x1number
y1number
x2number
y2number
radiusnumber

Returns

PathCreator

Implementation of

IPathCreator.arcTo

Defined in

leafer/packages/path/src/PathCreator.ts:92


drawEllipse

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

Parameters

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

Returns

PathCreator

Implementation of

IPathCreator.drawEllipse

Defined in

leafer/packages/path/src/PathCreator.ts:100


drawArc

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

Parameters

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

Returns

PathCreator

Implementation of

IPathCreator.drawArc

Defined in

leafer/packages/path/src/PathCreator.ts:106


drawPoints

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

Parameters

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

Returns

PathCreator

Implementation of

IPathCreator.drawPoints

Defined in

leafer/packages/path/src/PathCreator.ts:112


clearPath

clearPath(): PathCreator

Returns

PathCreator

Implementation of

IPathCreator.clearPath

Defined in

leafer/packages/path/src/PathCreator.ts:118


paint

paint(): void

Returns

void

Defined in

leafer/packages/path/src/PathCreator.ts:122

Released under the MIT License.