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 ​
src/leafer/packages/path/src/PathCreator.ts:17
Properties ​
__path ​
• __path: IPathCommandData
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:15
Accessors ​
path ​
• get path(): IPathCommandData
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:13
• set path(value): void
Parameters ​
| Name | Type |
|---|---|
value | IPathCommandData |
Returns ​
void
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:12
Methods ​
set ​
â–¸ set(path?): PathCreator
Parameters ​
| Name | Type |
|---|---|
path? | string | IPathCommandData |
Returns ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:21
beginPath ​
â–¸ beginPath(): PathCreator
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:26
moveTo ​
â–¸ moveTo(x, y): PathCreator
Parameters ​
| Name | Type |
|---|---|
x | number |
y | number |
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:34
lineTo ​
â–¸ lineTo(x, y): PathCreator
Parameters ​
| Name | Type |
|---|---|
x | number |
y | number |
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:40
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 ​
src/leafer/packages/path/src/PathCreator.ts:46
quadraticCurveTo ​
â–¸ quadraticCurveTo(x1, y1, x, y): PathCreator
Parameters ​
| Name | Type |
|---|---|
x1 | number |
y1 | number |
x | number |
y | number |
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:52
closePath ​
â–¸ closePath(): PathCreator
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:58
rect ​
â–¸ rect(x, y, width, height): PathCreator
Parameters ​
| Name | Type |
|---|---|
x | number |
y | number |
width | number |
height | number |
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:66
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 ​
src/leafer/packages/path/src/PathCreator.ts:72
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 ​
src/leafer/packages/path/src/PathCreator.ts:78
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 ​
src/leafer/packages/path/src/PathCreator.ts:84
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 ​
src/leafer/packages/path/src/PathCreator.ts:90
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 ​
src/leafer/packages/path/src/PathCreator.ts:98
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 ​
src/leafer/packages/path/src/PathCreator.ts:104
drawPoints ​
â–¸ drawPoints(points, curve?, close?): PathCreator
Parameters ​
| Name | Type |
|---|---|
points | number[] | IPointData[] |
curve? | number | boolean |
close? | boolean |
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:110
clearPath ​
â–¸ clearPath(): PathCreator
Returns ​
Implementation of ​
Defined in ​
src/leafer/packages/path/src/PathCreator.ts:116
paint ​
â–¸ paint(): void
Returns ​
void