Class: PatternPathStream
Defined in: src/sdk/graphics/path/PatternPathStream.ts:32
A TransformingPathStream which converts an input path into path commands to draw a repeating pattern along the input path.
Implements
Constructors
Constructor
new PatternPathStream(
consumer
,pattern
):PatternPathStream
Defined in: src/sdk/graphics/path/PatternPathStream.ts:53
Constructor.
Parameters
Parameter | Type | Description |
---|---|---|
consumer | PathStream | The path stream that consumes this stream's transformed output. |
pattern | null | PathPattern | The pattern drawn by this stream. If the pattern is null , then this stream will pass through path commands to its consumer without transforming them into a pattern. |
Returns
PatternPathStream
Methods
arc()
arc(
x
,y
,radius
,startAngle
,endAngle
,counterClockwise?
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:217
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
Implementation of
beginPath()
beginPath():
void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:98
Begins a path. Erases all previous path state.
Returns
void
Implementation of
TransformingPathStream
.beginPath
bezierCurveTo()
bezierCurveTo(
cp1x
,cp1y
,cp2x
,cp2y
,x
,y
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:200
Not supported by this path stream. Calling this method will execute a moveTo()
command to the specified end
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
Implementation of
TransformingPathStream
.bezierCurveTo
closePath()
closePath():
void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:306
Paths a line from the current point to the first point defined by the current path.
Returns
void
Implementation of
TransformingPathStream
.closePath
getConsumer()
getConsumer():
PathStream
Defined in: src/sdk/graphics/path/PatternPathStream.ts:88
Gets the path stream that is consuming this stream's transformed output.
Returns
The path stream that is consuming this stream's transformed output.
Implementation of
TransformingPathStream
.getConsumer
getPattern()
getPattern():
null
|PathPattern
Defined in: src/sdk/graphics/path/PatternPathStream.ts:62
Gets the pattern drawn by this stream.
Returns
null
| PathPattern
The pattern drawn by this stream.
lineTo()
lineTo(
x
,y
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:122
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
Implementation of
moveTo()
moveTo(
x
,y
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:104
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
Implementation of
quadraticCurveTo()
quadraticCurveTo(
cpx
,cpy
,x
,y
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:212
Not supported by this path stream. Calling this method will execute a moveTo()
command to the specified end
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
Implementation of
TransformingPathStream
.quadraticCurveTo
setConsumer()
setConsumer(
consumer
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:93
Sets the path stream that consumes this stream's transformed output.
Parameters
Parameter | Type | Description |
---|---|---|
consumer | PathStream | The new consuming path stream. |
Returns
void
Implementation of
TransformingPathStream
.setConsumer
setPattern()
setPattern(
pattern
):void
Defined in: src/sdk/graphics/path/PatternPathStream.ts:71
Sets the pattern drawn by this stream. If the pattern is null
, then this stream will pass through path commands
to its consumer without transforming them into a pattern.
Parameters
Parameter | Type | Description |
---|---|---|
pattern | null | PathPattern | A pattern. |
Returns
void