normalize
Creates a new RoundedPolygon, moving and resizing this one, so it's completely inside the destination bounds.
If radial is true, the shape will be scaled to fit in the biggest circle centered in the destination bounds. This is useful when the shape is animated to rotate around its center. Otherwise, the shape will be scaled to fit in the destination bounds. With either option, the shape's original center will be aligned with the destination bounds center.
Return
A new RoundedPolygon that fits in the destination bounds.
Parameters
The original RoundedPolygon.
Whether to transform the shape to fit in the biggest circle centered in the destination bounds.
The destination bounds to fit.
Creates a new RoundedPolygon, moving and resizing this one, so it's completely inside (0, 0) - (1, 1) square.
If radial is true, the shape will be scaled to fit in the circle centered at (0.5, 0.5) with a radius of 0.5. This is useful when the shape is animated to rotate around its center. Otherwise, the shape will be scaled to fit in the (0, 0) - (1, 1) square. With either option, the shape center will be (0.5, 0.5).
Return
A new RoundedPolygon that fits in (0, 0) - (1, 1) square.
Parameters
The original RoundedPolygon.
Whether to transform the shape to fit in the circle centered at (0.5, 0.5) with a radius of 0.5.