Expand description
Parametric shapes as Bezier paths in pixel space, with the start points and directions After Effects and Lottie give them, so a trim cuts them where it cuts there.
Structs§
- Polystar
- A star or polygon, as a Lottie polystar draws it.
- Vertex
- One vertex of a Bezier subpath, in pixels: a point and its tangents relative to it.
Constants§
- KAPPA
- The four-cubic circle constant: a quarter circle’s control points lie this fraction of the radius along its end tangents.
Functions§
- append_
subpath - Appends a subpath through
verticestopath: a cubic between each pair, a line where both tangents are zero, and, whenclosed, back to the first. A single vertex is a degenerate subpath of no length. - ellipse
- The ellipse inscribed in a full
sizeaboutcenter, turneddegreesclockwise: four cubics from its top, clockwise. - polystar
- A polystar’s outline: its first point straight up from the centre before rotation, the rest clockwise. Each corner’s tangents run along the circle through it, as long as the roundness times a quarter (polygon) or half (star) of the circle’s arc per corner, as Lottie rounds them.
- rectangle
- A rectangle of full
sizeaboutcenter, corners rounded byradius(capped at half the shorter side), turneddegreesclockwise. It starts at its top-right corner (below the corner’s arc when rounded) and runs clockwise.