shapes library
A library for easy creation, transformation, and morphing of rounded polygonal shapes.
Classes
- CornerRounding
- Cubic
- Feature
- While a polygon's shape can be drawn solely using a list of Cubic objects representing its raw curves and lines, features add an extra layer of context to groups of cubics. Features group cubics into (straight) edges, convex corners, or concave corners. For example, rounding a rectangle adds many cubics around its edges, but the rectangle's overall number of corners remains the same. Morph therefore uses this grouping for several reasons:
- Morph
- MutableCubic
- RoundedPolygon
- The RoundedPolygon class allows simple construction of polygonal shapes with optional rounding at the vertices. Polygons can be constructed with either the number of vertices desired or an ordered list of vertices.
Typedefs
- PointTransformer = TransformResult Function(double x, double y)
- TransformResult = (double, double)