Interface: PathStream
Defined in: src/sdk/graphics/path/PathStream.ts:4
A stream of canvas 2D rendering context-like path commands.
Extended by
Methods
arc()
arc(
x,y,radius,startAngle,endAngle,counterClockwise?):void
Defined in: src/sdk/graphics/path/PathStream.ts:53
Paths an arc.
Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | The x-coordinate of the center of the circle containing the arc. |
y | number | The y-coordinate of the center of the circle containing the arc. |
radius | number | The radius of the arc. |
startAngle | number | The angle of the start of the arc, in radians. |
endAngle | number | The angle of the end of the arc, in radians. |
counterClockwise? | boolean | Whether the arc should be drawn counterclockwise. False by default. |
Returns
void
beginPath()
beginPath():
void
Defined in: src/sdk/graphics/path/PathStream.ts:8
Begins a path. Erases all previous path state.
Returns
void
bezierCurveTo()
bezierCurveTo(
cp1x,cp1y,cp2x,cp2y,x,y):void
Defined in: src/sdk/graphics/path/PathStream.ts:33
Paths a cubic Bezier curve from the current point to a specified point.
Parameters
| Parameter | Type | Description |
|---|---|---|
cp1x | number | The x-coordinate of the first control point. |
cp1y | number | The y-coordinate of the first control point. |
cp2x | number | The x-coordinate of the second control point. |
cp2y | number | The y-coordinate of the second control point. |
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void
closePath()
closePath():
void
Defined in: src/sdk/graphics/path/PathStream.ts:58
Paths a line from the current point to the first point defined by the current path.
Returns
void
lineTo()
lineTo(
x,y):void
Defined in: src/sdk/graphics/path/PathStream.ts:22
Paths a straight line from the current point to a specified point.
Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void
moveTo()
moveTo(
x,y):void
Defined in: src/sdk/graphics/path/PathStream.ts:15
Moves to a specified point.
Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | The x-coordinate of the point to which to move. |
y | number | The y-coordinate of the point to which to move. |
Returns
void
quadraticCurveTo()
quadraticCurveTo(
cpx,cpy,x,y):void
Defined in: src/sdk/graphics/path/PathStream.ts:42
Paths a quadrative Bezier curve from the current point to a specified point.
Parameters
| Parameter | Type | Description |
|---|---|---|
cpx | number | The x-coordinate of the control point. |
cpy | number | The y-coordinate of the control point. |
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void