A minimal interface for a curve generator which supports the rendering of lines and areas.
While lines are defined as a sequence of two-dimensional [x, y] points,
and areas are similarly defined by a topline and a baseline,
there remains the task of transforming this discrete representation into a continuous shape: i.e., how to interpolate between the points.
A curve generator serves this purpose.
Curves are typically not constructed or used directly, instead being passed to line.curve and area.curve.
Indicates the start of a new area segment.
Each area segment consists of exactly two line segments: the topline, followed by the baseline, with the baseline points in reverse order.
Returns void
lineEnd
lineEnd(): void
Indicates the end of the current line segment.
Returns void
lineStart
lineStart(): void
Indicates the start of a new line segment. Zero or more points will follow.
Returns void
point
point(x, y): void
Indicates a new point in the current line segment with the given x- and y-values.
A minimal interface for a curve generator which supports the rendering of lines and areas.
While lines are defined as a sequence of two-dimensional [x, y] points, and areas are similarly defined by a topline and a baseline, there remains the task of transforming this discrete representation into a continuous shape: i.e., how to interpolate between the points. A curve generator serves this purpose.
Curves are typically not constructed or used directly, instead being passed to line.curve and area.curve.