Documentation / @ripl/core / Shape2DOptions
Type Alias: Shape2DOptions<TState> ​
Shape2DOptions<
TState> =ElementOptions<TState> &object
Defined in: packages/core/src/core/shape.ts:27
Options for a 2D shape, adding automatic fill/stroke and clipping controls.
Type Declaration ​
autoFill? ​
optionalautoFill?:boolean
Whether the shape automatically fills its path after rendering when a fill is set. Defaults to true.
autoStroke? ​
optionalautoStroke?:boolean
Whether the shape automatically strokes its outline after rendering when a stroke is set. Defaults to true.
cachePath? ​
optionalcachePath?:boolean
Whether to reuse the traced path across render cycles while the shape is unchanged, avoiding re-tracing on backends that support it. Defaults to true; set false for path renderers that read external mutable data not held in element state.
clip? ​
optionalclip?:boolean
Whether the shape's path is used as a clipping region for descendants instead of being filled or stroked. Defaults to false.
Type Parameters ​
| Type Parameter | Default type |
|---|---|
TState extends BaseElementState | BaseElementState |