Documentation / @ripl/core / ArcState
Interface: ArcState ​
Defined in: packages/core/src/elements/arc.ts:48
State interface for an arc element, defining center, angles, radii, padding, and border radius.
Extends ​
Properties ​
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
borderRadius? | number | The corner radius applied to the arc's corners, clamped to half the band thickness and to what the sector's span allows. An annular sector rounds all four corners; an open arc rounds the two outer corners and keeps a sharp center point. A non-zero value on an open arc also closes the path through the center, turning a chord-closed segment into a wedge and so changing its filled area, hit region and stroke — do not animate it up from 0 on an open arc. | - | packages/core/src/elements/arc.ts:66 |
cx | number | The x-coordinate of the arc's center. | - | packages/core/src/elements/arc.ts:50 |
cy | number | The y-coordinate of the arc's center. | - | packages/core/src/elements/arc.ts:52 |
direction? | Direction | Directionality used when rendering text. | BaseState.direction | packages/core/src/context/types.ts:229 |
endAngle | number | The end angle of the arc, in radians. | - | packages/core/src/elements/arc.ts:56 |
fill? | string | Fill style (CSS color, gradient, or pattern) used to paint filled regions. | BaseState.fill | packages/core/src/context/types.ts:225 |
filter? | string | CSS filter string applied to subsequent drawing operations (e.g. blur(4px)). | BaseState.filter | packages/core/src/context/types.ts:227 |
font? | string | CSS font shorthand used when rendering text. | BaseState.font | packages/core/src/context/types.ts:231 |
fontKerning? | FontKerning | Whether font kerning is applied when rendering text. | BaseState.fontKerning | packages/core/src/context/types.ts:233 |
globalCompositeOperation? | unknown | Compositing operation controlling how new drawing is blended with existing content. | BaseState.globalCompositeOperation | packages/core/src/context/types.ts:237 |
innerRadius? | number | The inner radius of the arc, producing an annular sector when set. | - | packages/core/src/elements/arc.ts:60 |
lineCap? | LineCap | Cap style drawn at the endpoints of stroked lines. | BaseState.lineCap | packages/core/src/context/types.ts:239 |
lineDash? | number[] | Dash pattern as alternating stroke and gap lengths; empty for a solid line. | BaseState.lineDash | packages/core/src/context/types.ts:241 |
lineDashOffset? | number | Distance into the line dash pattern at which dashing begins. | BaseState.lineDashOffset | packages/core/src/context/types.ts:243 |
lineJoin? | LineJoin | Join style drawn where two stroked segments meet. | BaseState.lineJoin | packages/core/src/context/types.ts:245 |
lineWidth? | number | Width, in pixels, of stroked lines. | BaseState.lineWidth | packages/core/src/context/types.ts:247 |
miterLimit? | number | Miter length limit ratio applied to miter line joins. | BaseState.miterLimit | packages/core/src/context/types.ts:249 |
opacity? | number | Global alpha applied to everything drawn, from 0 to 1. | BaseState.opacity | packages/core/src/context/types.ts:235 |
padAngle? | number | The angular padding between the arc and its neighbors, in radians. Produces a wedge-shaped gap that widens with radius; use ArcState.padWidth for a gap of constant width. Ignored whenever padWidth is provided, 0 included. A padAngle wider than the sector collapses it onto its endAngle, where an oversized padWidth collapses it onto its mid-angle. | - | packages/core/src/elements/arc.ts:62 |
padWidth? | number | The padding between the arc and its neighbors, in logical pixels. Each radius is inset by asin(padWidth / 2r), so an annular sector holds the gap constant and faces its neighbors with parallel edges, its inner radius floored at the radius where those edges would meet so that an innerRadius of 0 still carries the gap to the center rather than tapering it away; an open arc has no inner edge to inset, so the gap becomes a single trim at the outer radius and adjacent edges converge to nothing at the center. Takes precedence over ArcState.padAngle whenever it is provided — padWidth: 0 means no padding rather than a fall back to padAngle, so animating it up from 0 is continuous. Negative values are treated as 0. | - | packages/core/src/elements/arc.ts:64 |
radius | number | The outer radius of the arc. | - | packages/core/src/elements/arc.ts:58 |
rotation? | Rotation | Rotation applied to the element's transform, as radians or a deg/rad string. | BaseState.rotation | packages/core/src/context/types.ts:275 |
shadowBlur? | number | Gaussian blur radius applied to drawn shadows. | BaseState.shadowBlur | packages/core/src/context/types.ts:251 |
shadowColor? | string | Color of drawn shadows. | BaseState.shadowColor | packages/core/src/context/types.ts:253 |
shadowOffsetX? | number | Horizontal offset, in pixels, of drawn shadows. | BaseState.shadowOffsetX | packages/core/src/context/types.ts:255 |
shadowOffsetY? | number | Vertical offset, in pixels, of drawn shadows. | BaseState.shadowOffsetY | packages/core/src/context/types.ts:257 |
startAngle | number | The start angle of the arc, in radians. | - | packages/core/src/elements/arc.ts:54 |
stroke? | string | Stroke style (CSS color, gradient, or pattern) used to paint outlines. | BaseState.stroke | packages/core/src/context/types.ts:259 |
textAlign? | TextAlignment | Horizontal alignment of text relative to the drawing position. | BaseState.textAlign | packages/core/src/context/types.ts:261 |
textBaseline? | TextBaseline | Vertical baseline used when positioning text. | BaseState.textBaseline | packages/core/src/context/types.ts:263 |
transformOriginX? | TransformOrigin | Horizontal origin about which rotation and scaling are applied. | BaseState.transformOriginX | packages/core/src/context/types.ts:277 |
transformOriginY? | TransformOrigin | Vertical origin about which rotation and scaling are applied. | BaseState.transformOriginY | packages/core/src/context/types.ts:279 |
transformScaleX? | number | Horizontal scale factor applied to the element's transform. | BaseState.transformScaleX | packages/core/src/context/types.ts:271 |
transformScaleY? | number | Vertical scale factor applied to the element's transform. | BaseState.transformScaleY | packages/core/src/context/types.ts:273 |
translateX? | number | Horizontal translation, in pixels, applied to the element's transform. | BaseState.translateX | packages/core/src/context/types.ts:267 |
translateY? | number | Vertical translation, in pixels, applied to the element's transform. | BaseState.translateY | packages/core/src/context/types.ts:269 |
zIndex? | number | Stacking order used to sort elements during rendering; higher values draw on top. | BaseState.zIndex | packages/core/src/context/types.ts:265 |