Class: TransformingPathStreamStack
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:7
A stack of TransformingPathStreams. Inputs are passed through the entire stack from top to bottom before the final transformed output is sent to a consuming stream.
Extends
Constructors
Constructor
new TransformingPathStreamStack(
consumer):TransformingPathStreamStack
Defined in: src/sdk/graphics/path/PathStream.ts:144
Constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
consumer | PathStream | The path stream that consumes this stream's transformed output. |
Returns
TransformingPathStreamStack
Inherited from
AbstractTransformingPathStream.constructor
Properties
consumer
protectedconsumer:PathStream
Defined in: src/sdk/graphics/path/PathStream.ts:144
The path stream that consumes this stream's transformed output.
Inherited from
AbstractTransformingPathStream.consumer
Methods
arc()
arc(
x,y,radius,startAngle,endAngle,counterClockwise?):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:86
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
Overrides
AbstractTransformingPathStream.arc
beginPath()
beginPath():
void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:61
Begins a path. Erases all previous path state.
Returns
void
Overrides
AbstractTransformingPathStream.beginPath
bezierCurveTo()
bezierCurveTo(
cp1x,cp1y,cp2x,cp2y,x,y):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:76
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
Overrides
AbstractTransformingPathStream.bezierCurveTo
closePath()
closePath():
void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:91
Paths a line from the current point to the first point defined by the current path.
Returns
void
Overrides
AbstractTransformingPathStream.closePath
getConsumer()
getConsumer():
PathStream
Defined in: src/sdk/graphics/path/PathStream.ts:148
Gets the path stream that is consuming this stream's transformed output.
Returns
The path stream that is consuming this stream's transformed output.
Inherited from
AbstractTransformingPathStream.getConsumer
lineTo()
lineTo(
x,y):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:71
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
Overrides
AbstractTransformingPathStream.lineTo
moveTo()
moveTo(
x,y):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:66
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
Overrides
AbstractTransformingPathStream.moveTo
pop()
pop():
undefined|TransformingPathStream
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:24
Removes the top-most path stream from this stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined | TransformingPathStream
The removed path stream, or undefined if this stack was empty.
push()
push(
stream):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:14
Adds a transforming path stream to the top of this stack.
Parameters
| Parameter | Type | Description |
|---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
quadraticCurveTo()
quadraticCurveTo(
cpx,cpy,x,y):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:81
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
Overrides
AbstractTransformingPathStream.quadraticCurveTo
setConsumer()
setConsumer(
consumer):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:54
Sets the path stream that consumes this stream's transformed output.
Parameters
| Parameter | Type | Description |
|---|---|---|
consumer | PathStream | The new consuming path stream. |
Returns
void
Overrides
AbstractTransformingPathStream.setConsumer
shift()
shift():
undefined|TransformingPathStream
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:46
Removes the bottom-most path stream from this stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined | TransformingPathStream
The removed path stream, or undefined if this stack was empty.
unshift()
unshift(
stream):void
Defined in: src/sdk/graphics/path/TransformingPathStreamStack.ts:34
Adds a transforming path stream to the bottom of this stack.
Parameters
| Parameter | Type | Description |
|---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void