diff --git a/docs/specs/shapes.md b/docs/specs/shapes.md index 165753f..24790a7 100644 --- a/docs/specs/shapes.md +++ b/docs/specs/shapes.md @@ -78,14 +78,21 @@ All paths MUST be closed unless specified otherwise in the rendering instruction When instructions call for an equality comparison between two values, implementations MAY consider similar values to be equal to overcome numerical instability. -### Drawing Commands +### Bezier Conversions + +This documents includes algorithms to convert parametric shapes into bezier curves. + +Implementations MAY use different implementations than the algorithms provided here +but the output shape MUST be visually indistinguishable from the output of these algorithms. + +Furthermore, when drawing individual shapes the stroke order and direction is not importand +but implementations of Trim Path MUST follow the stroke order as defined by these algorithms. Drawing instructions will contain the following commands: -* _add vertex_: Adds a vertex to the bezier shape in global coordinates -* _set in tangent_: Sets the cubic tangent to the last added vertex, with coordinates relative to it. If omitted, tangents MUST be $(0, 0)$. -* _set out tangent_: Sets the cubic tangent from the last added vertex, with coordinates relative to it. If omitted, tangents MUST be $(0, 0)$. -* _lerp_: Linearly interpolates two points or scalars by a given amount. +* _Add vertex_: Adds a vertex to the bezier shape in global coordinates +* _Set in tangent_: Sets the cubic tangent to the last added vertex, with coordinates relative to it. If omitted, tangents MUST be $(0, 0)$. +* _Set out tangent_: Sets the cubic tangent from the last added vertex, with coordinates relative to it. If omitted, tangents MUST be $(0, 0)$. ### Approximating Ellipses with Cubic Bezier