WPathSegment
Defined in: wpath.ts:206
Represents a bezier curve segment in a WPath.
Constructors
Constructor
new WPathSegment(
points):WPathSegment
Defined in: wpath.ts:209
Parameters
points
Returns
WPathSegment
Properties
points
points:
CubicBezierPoints
Defined in: wpath.ts:207
Methods
getLength()
getLength():
number
Defined in: wpath.ts:216
Returns an approximation of the path length using a Gaussian quadrature.
Returns
number
interpolate()
interpolate(
other,t):WPathSegment
Defined in: wpath.ts:223
Returns a new segment that is a linear interpolation of the segment against the specified segment by t.
Parameters
other
WPathSegment
t
number
Returns
WPathSegment
split()
split(
t): [WPathSegment,WPathSegment]
Defined in: wpath.ts:234
Splits the bezier curve into two segments at t using De Casteljau’s algorithm.
Parameters
t
number = 0.5
Returns
[WPathSegment, WPathSegment]
An array of two new WPathSegment instances.