Class: PathCreator
Implements
Table of contents
Constructors
Properties
Accessors
Methods
- set
- beginPath
- moveTo
- lineTo
- bezierCurveTo
- quadraticCurveTo
- closePath
- rect
- roundRect
- ellipse
- arc
- arcTo
- drawEllipse
- drawArc
- drawPoints
- clearPath
- paint
Constructors
constructor
• new PathCreator(path?
): PathCreator
Parameters
Name | Type |
---|---|
path? | string | IPathCommandData |
Returns
Defined in
leafer/packages/path/src/PathCreator.ts:15
Properties
__path
• __path: IPathCommandData
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:13
Accessors
path
• get
path(): IPathCommandData
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:11
• set
path(value
): void
Parameters
Name | Type |
---|---|
value | IPathCommandData |
Returns
void
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:10
Methods
set
▸ set(path?
): PathCreator
Parameters
Name | Type |
---|---|
path? | string | IPathCommandData |
Returns
Defined in
leafer/packages/path/src/PathCreator.ts:19
beginPath
▸ beginPath(): PathCreator
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:28
moveTo
▸ moveTo(x
, y
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:36
lineTo
▸ lineTo(x
, y
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:42
bezierCurveTo
▸ bezierCurveTo(x1
, y1
, x2
, y2
, x
, y
): PathCreator
Parameters
Name | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
x | number |
y | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:48
quadraticCurveTo
▸ quadraticCurveTo(x1
, y1
, x
, y
): PathCreator
Parameters
Name | Type |
---|---|
x1 | number |
y1 | number |
x | number |
y | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:54
closePath
▸ closePath(): PathCreator
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:60
rect
▸ rect(x
, y
, width
, height
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:68
roundRect
▸ roundRect(x
, y
, width
, height
, cornerRadius
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
cornerRadius | number | number [] |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:74
ellipse
▸ ellipse(x
, y
, radiusX
, radiusY
, rotation?
, startAngle?
, endAngle?
, anticlockwise?
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
radiusX | number |
radiusY | number |
rotation? | number |
startAngle? | number |
endAngle? | number |
anticlockwise? | boolean |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:80
arc
▸ arc(x
, y
, radius
, startAngle?
, endAngle?
, anticlockwise?
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle? | number |
endAngle? | number |
anticlockwise? | boolean |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:86
arcTo
▸ arcTo(x1
, y1
, x2
, y2
, radius
): PathCreator
Parameters
Name | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:92
drawEllipse
▸ drawEllipse(x
, y
, radiusX
, radiusY
, rotation?
, startAngle?
, endAngle?
, anticlockwise?
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
radiusX | number |
radiusY | number |
rotation? | number |
startAngle? | number |
endAngle? | number |
anticlockwise? | boolean |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:100
drawArc
▸ drawArc(x
, y
, radius
, startAngle?
, endAngle?
, anticlockwise?
): PathCreator
Parameters
Name | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle? | number |
endAngle? | number |
anticlockwise? | boolean |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:106
drawPoints
▸ drawPoints(points
, curve?
, close?
): PathCreator
Parameters
Name | Type |
---|---|
points | number [] |
curve? | number | boolean |
close? | boolean |
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:112
clearPath
▸ clearPath(): PathCreator
Returns
Implementation of
Defined in
leafer/packages/path/src/PathCreator.ts:118
paint
▸ paint(): void
Returns
void