Skip to content

Documentation / @ripl/core / PathState

Interface: PathState

Defined in: packages/core/src/elements/path.ts:20

State interface for a path element, defining bounding position and dimensions.

Extends

Properties

PropertyTypeDescriptionInherited fromDefined in
direction?DirectionDirectionality used when rendering text.BaseState.directionpackages/core/src/context/types.ts:188
fill?stringFill style (CSS colour, gradient, or pattern) used to paint filled regions.BaseState.fillpackages/core/src/context/types.ts:184
filter?stringCSS filter string applied to subsequent drawing operations (e.g. blur(4px)).BaseState.filterpackages/core/src/context/types.ts:186
font?stringCSS font shorthand used when rendering text.BaseState.fontpackages/core/src/context/types.ts:190
fontKerning?FontKerningWhether font kerning is applied when rendering text.BaseState.fontKerningpackages/core/src/context/types.ts:192
globalCompositeOperation?unknownCompositing operation controlling how new drawing is blended with existing content.BaseState.globalCompositeOperationpackages/core/src/context/types.ts:196
heightnumberThe height of the path's bounding box.-packages/core/src/elements/path.ts:28
lineCap?LineCapCap style drawn at the endpoints of stroked lines.BaseState.lineCappackages/core/src/context/types.ts:198
lineDash?number[]Dash pattern as alternating stroke and gap lengths; empty for a solid line.BaseState.lineDashpackages/core/src/context/types.ts:200
lineDashOffset?numberDistance into the line dash pattern at which dashing begins.BaseState.lineDashOffsetpackages/core/src/context/types.ts:202
lineJoin?LineJoinJoin style drawn where two stroked segments meet.BaseState.lineJoinpackages/core/src/context/types.ts:204
lineWidth?numberWidth, in pixels, of stroked lines.BaseState.lineWidthpackages/core/src/context/types.ts:206
miterLimit?numberMiter length limit ratio applied to miter line joins.BaseState.miterLimitpackages/core/src/context/types.ts:208
opacity?numberGlobal alpha applied to everything drawn, from 0 to 1.BaseState.opacitypackages/core/src/context/types.ts:194
rotation?RotationRotation applied to the element's transform, as radians or a deg/rad string.BaseState.rotationpackages/core/src/context/types.ts:234
shadowBlur?numberGaussian blur radius applied to drawn shadows.BaseState.shadowBlurpackages/core/src/context/types.ts:210
shadowColor?stringColour of drawn shadows.BaseState.shadowColorpackages/core/src/context/types.ts:212
shadowOffsetX?numberHorizontal offset, in pixels, of drawn shadows.BaseState.shadowOffsetXpackages/core/src/context/types.ts:214
shadowOffsetY?numberVertical offset, in pixels, of drawn shadows.BaseState.shadowOffsetYpackages/core/src/context/types.ts:216
stroke?stringStroke style (CSS colour, gradient, or pattern) used to paint outlines.BaseState.strokepackages/core/src/context/types.ts:218
textAlign?TextAlignmentHorizontal alignment of text relative to the drawing position.BaseState.textAlignpackages/core/src/context/types.ts:220
textBaseline?TextBaselineVertical baseline used when positioning text.BaseState.textBaselinepackages/core/src/context/types.ts:222
transformOriginX?TransformOriginHorizontal origin about which rotation and scaling are applied.BaseState.transformOriginXpackages/core/src/context/types.ts:236
transformOriginY?TransformOriginVertical origin about which rotation and scaling are applied.BaseState.transformOriginYpackages/core/src/context/types.ts:238
transformScaleX?numberHorizontal scale factor applied to the element's transform.BaseState.transformScaleXpackages/core/src/context/types.ts:230
transformScaleY?numberVertical scale factor applied to the element's transform.BaseState.transformScaleYpackages/core/src/context/types.ts:232
translateX?numberHorizontal translation, in pixels, applied to the element's transform.BaseState.translateXpackages/core/src/context/types.ts:226
translateY?numberVertical translation, in pixels, applied to the element's transform.BaseState.translateYpackages/core/src/context/types.ts:228
widthnumberThe width of the path's bounding box.-packages/core/src/elements/path.ts:26
xnumberThe x-coordinate of the path's bounding box top-left corner.-packages/core/src/elements/path.ts:22
ynumberThe y-coordinate of the path's bounding box top-left corner.-packages/core/src/elements/path.ts:24
zIndex?numberStacking order used to sort elements during rendering; higher values draw on top.BaseState.zIndexpackages/core/src/context/types.ts:224