Skip to main content

Abstract Class: AbstractTransformingPathStream

Defined in: src/sdk/graphics/path/PathStream.ts:139

An abstract implementation of a path stream which sends a transformed version of its input to be consumed by another stream.

Extended by​

Implements​

Constructors​

Constructor​

new AbstractTransformingPathStream(consumer): AbstractTransformingPathStream

Defined in: src/sdk/graphics/path/PathStream.ts:144

Constructor.

Parameters​

ParameterTypeDescription
consumerPathStreamThe path stream that consumes this stream's transformed output.

Returns​

AbstractTransformingPathStream

Properties​

consumer​

protected consumer: PathStream

Defined in: src/sdk/graphics/path/PathStream.ts:144

The path stream that consumes this stream's transformed output.

Methods​

arc()​

abstract arc(x, y, radius, startAngle, endAngle, counterClockwise?): void

Defined in: src/sdk/graphics/path/PathStream.ts:173

Paths an arc.

Parameters​

ParameterTypeDescription
xnumberThe x-coordinate of the center of the circle containing the arc.
ynumberThe y-coordinate of the center of the circle containing the arc.
radiusnumberThe radius of the arc.
startAnglenumberThe angle of the start of the arc, in radians.
endAnglenumberThe angle of the end of the arc, in radians.
counterClockwise?booleanWhether the arc should be drawn counterclockwise. False by default.

Returns​

void

Implementation of​

TransformingPathStream.arc


beginPath()​

abstract beginPath(): void

Defined in: src/sdk/graphics/path/PathStream.ts:158

Begins a path. Erases all previous path state.

Returns​

void

Implementation of​

TransformingPathStream.beginPath


bezierCurveTo()​

abstract bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y): void

Defined in: src/sdk/graphics/path/PathStream.ts:167

Paths a cubic Bezier curve from the current point to a specified point.

Parameters​

ParameterTypeDescription
cp1xnumberThe x-coordinate of the first control point.
cp1ynumberThe y-coordinate of the first control point.
cp2xnumberThe x-coordinate of the second control point.
cp2ynumberThe y-coordinate of the second control point.
xnumberThe x-coordinate of the end point.
ynumberThe y-coordinate of the end point.

Returns​

void

Implementation of​

TransformingPathStream.bezierCurveTo


closePath()​

abstract closePath(): void

Defined in: src/sdk/graphics/path/PathStream.ts:176

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/PathStream.ts:148

Gets the path stream that is consuming this stream's transformed output.

Returns​

PathStream

The path stream that is consuming this stream's transformed output.

Implementation of​

TransformingPathStream.getConsumer


lineTo()​

abstract lineTo(x, y): void

Defined in: src/sdk/graphics/path/PathStream.ts:164

Paths a straight line from the current point to a specified point.

Parameters​

ParameterTypeDescription
xnumberThe x-coordinate of the end point.
ynumberThe y-coordinate of the end point.

Returns​

void

Implementation of​

TransformingPathStream.lineTo


moveTo()​

abstract moveTo(x, y): void

Defined in: src/sdk/graphics/path/PathStream.ts:161

Moves to a specified point.

Parameters​

ParameterTypeDescription
xnumberThe x-coordinate of the point to which to move.
ynumberThe y-coordinate of the point to which to move.

Returns​

void

Implementation of​

TransformingPathStream.moveTo


quadraticCurveTo()​

abstract quadraticCurveTo(cpx, cpy, x, y): void

Defined in: src/sdk/graphics/path/PathStream.ts:170

Paths a quadrative Bezier curve from the current point to a specified point.

Parameters​

ParameterTypeDescription
cpxnumberThe x-coordinate of the control point.
cpynumberThe y-coordinate of the control point.
xnumberThe x-coordinate of the end point.
ynumberThe y-coordinate of the end point.

Returns​

void

Implementation of​

TransformingPathStream.quadraticCurveTo


setConsumer()​

setConsumer(consumer): void

Defined in: src/sdk/graphics/path/PathStream.ts:153

Sets the path stream that consumes this stream's transformed output.

Parameters​

ParameterTypeDescription
consumerPathStreamThe new consuming path stream.

Returns​

void

Implementation of​

TransformingPathStream.setConsumer