Skip to content

Documentation / @ripl/core / BaseState

Interface: BaseState

Defined in: packages/core/src/context/types.ts:182

The full set of visual state properties inherited by every renderable element.

Properties

PropertyTypeDescriptionDefined in
directionDirectionDirectionality used when rendering text.packages/core/src/context/types.ts:188
fillstringFill style (CSS colour, gradient, or pattern) used to paint filled regions.packages/core/src/context/types.ts:184
filterstringCSS filter string applied to subsequent drawing operations (e.g. blur(4px)).packages/core/src/context/types.ts:186
fontstringCSS font shorthand used when rendering text.packages/core/src/context/types.ts:190
fontKerningFontKerningWhether font kerning is applied when rendering text.packages/core/src/context/types.ts:192
globalCompositeOperationunknownCompositing operation controlling how new drawing is blended with existing content.packages/core/src/context/types.ts:196
lineCapLineCapCap style drawn at the endpoints of stroked lines.packages/core/src/context/types.ts:198
lineDashnumber[]Dash pattern as alternating stroke and gap lengths; empty for a solid line.packages/core/src/context/types.ts:200
lineDashOffsetnumberDistance into the line dash pattern at which dashing begins.packages/core/src/context/types.ts:202
lineJoinLineJoinJoin style drawn where two stroked segments meet.packages/core/src/context/types.ts:204
lineWidthnumberWidth, in pixels, of stroked lines.packages/core/src/context/types.ts:206
miterLimitnumberMiter length limit ratio applied to miter line joins.packages/core/src/context/types.ts:208
opacitynumberGlobal alpha applied to everything drawn, from 0 to 1.packages/core/src/context/types.ts:194
rotationRotationRotation applied to the element's transform, as radians or a deg/rad string.packages/core/src/context/types.ts:234
shadowBlurnumberGaussian blur radius applied to drawn shadows.packages/core/src/context/types.ts:210
shadowColorstringColour of drawn shadows.packages/core/src/context/types.ts:212
shadowOffsetXnumberHorizontal offset, in pixels, of drawn shadows.packages/core/src/context/types.ts:214
shadowOffsetYnumberVertical offset, in pixels, of drawn shadows.packages/core/src/context/types.ts:216
strokestringStroke style (CSS colour, gradient, or pattern) used to paint outlines.packages/core/src/context/types.ts:218
textAlignTextAlignmentHorizontal alignment of text relative to the drawing position.packages/core/src/context/types.ts:220
textBaselineTextBaselineVertical baseline used when positioning text.packages/core/src/context/types.ts:222
transformOriginXTransformOriginHorizontal origin about which rotation and scaling are applied.packages/core/src/context/types.ts:236
transformOriginYTransformOriginVertical origin about which rotation and scaling are applied.packages/core/src/context/types.ts:238
transformScaleXnumberHorizontal scale factor applied to the element's transform.packages/core/src/context/types.ts:230
transformScaleYnumberVertical scale factor applied to the element's transform.packages/core/src/context/types.ts:232
translateXnumberHorizontal translation, in pixels, applied to the element's transform.packages/core/src/context/types.ts:226
translateYnumberVertical translation, in pixels, applied to the element's transform.packages/core/src/context/types.ts:228
zIndexnumberStacking order used to sort elements during rendering; higher values draw on top.packages/core/src/context/types.ts:224