Clipping
In some cases, shape geometry may need to be clipped to fit to a specific outline. For example, a movie ranking shape (i.e. rating that uses stars) could be constructed using a rectangle shape that grows based on the value, which is then clipped to a shape consisting of the 5 stars.
Clipping for a shape is performed by taking all geometry created for the shape (both geometry in the shape and that shape's sub-shapes) and intersecting it with the clipping mask defined by the shape clipping settings.
Clipping schema
Property | Type | Description |
---|---|---|
geometry | Geometry[] | |
stroke | Stroke (optional) |
Stroke
Clipping removes all geometry that falls outside of the clipping path, but sometimes a geometry that equals the clipping path is needed. For example, in the star rating example above, if you want a line to be placed around each star, you would need to add new geometry that matches the same path as the clip path. Instead, a stroke can be added to the clipping path which adds the extra geometry with the specific stroke settings without needing a separate copy of the geometry.
Property | Type | Description |
---|---|---|
color | string, formula | |
pattern | string, formula | |
width | string, formula |
Updated 8 months ago