Constructor
new CustomCurveSurface()
Properties:
| Name | Type | Description |
|---|---|---|
points |
Array.<object> | The anchor/control points of the Bezier curves (managed by |
curves |
Array.<object> | The Bezier curves forming the surface. |
bboxes |
Array.<object> | Cached bounding boxes of the curves. |
notDone |
boolean | Whether the user is still drawing the path. |
isClosed |
boolean | Whether the curve forms a closed loop. |
outRays |
Array.<OutRay> | The expressions of the outgoing rays. |
twoSided |
boolean | Whether the surface is two-sided. |
Extends
- BaseCustomSurface
Methods
traceOffsetPath(canvasRenderer, offset)
Build a sub-path tracing each Bezier curve offset by offset units along
its normal. Offsetting is done by sampling each curve and connecting the
samples with straight line segments, which is a good approximation for
small offsets (such as half the stroke width) and is robust for nearly
degenerate curves (where Bezier#offset can fail).
Parameters:
| Name | Type | Description |
|---|---|---|
canvasRenderer |
CanvasRenderer | |
offset |
number |