Skip to content

Documentation / @ripl/core / BaseState

Interface: BaseState ​

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

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:229
fillstringFill style (CSS color, gradient, or pattern) used to paint filled regions.packages/core/src/context/types.ts:225
filterstringCSS filter string applied to subsequent drawing operations (e.g. blur(4px)).packages/core/src/context/types.ts:227
fontstringCSS font shorthand used when rendering text.packages/core/src/context/types.ts:231
fontKerningFontKerningWhether font kerning is applied when rendering text.packages/core/src/context/types.ts:233
globalCompositeOperationunknownCompositing operation controlling how new drawing is blended with existing content.packages/core/src/context/types.ts:237
lineCapLineCapCap style drawn at the endpoints of stroked lines.packages/core/src/context/types.ts:239
lineDashnumber[]Dash pattern as alternating stroke and gap lengths; empty for a solid line.packages/core/src/context/types.ts:241
lineDashOffsetnumberDistance into the line dash pattern at which dashing begins.packages/core/src/context/types.ts:243
lineJoinLineJoinJoin style drawn where two stroked segments meet.packages/core/src/context/types.ts:245
lineWidthnumberWidth, in pixels, of stroked lines.packages/core/src/context/types.ts:247
miterLimitnumberMiter length limit ratio applied to miter line joins.packages/core/src/context/types.ts:249
opacitynumberGlobal alpha applied to everything drawn, from 0 to 1.packages/core/src/context/types.ts:235
rotationRotationRotation applied to the element's transform, as radians or a deg/rad string.packages/core/src/context/types.ts:275
shadowBlurnumberGaussian blur radius applied to drawn shadows.packages/core/src/context/types.ts:251
shadowColorstringColor of drawn shadows.packages/core/src/context/types.ts:253
shadowOffsetXnumberHorizontal offset, in pixels, of drawn shadows.packages/core/src/context/types.ts:255
shadowOffsetYnumberVertical offset, in pixels, of drawn shadows.packages/core/src/context/types.ts:257
strokestringStroke style (CSS color, gradient, or pattern) used to paint outlines.packages/core/src/context/types.ts:259
textAlignTextAlignmentHorizontal alignment of text relative to the drawing position.packages/core/src/context/types.ts:261
textBaselineTextBaselineVertical baseline used when positioning text.packages/core/src/context/types.ts:263
transformOriginXTransformOriginHorizontal origin about which rotation and scaling are applied.packages/core/src/context/types.ts:277
transformOriginYTransformOriginVertical origin about which rotation and scaling are applied.packages/core/src/context/types.ts:279
transformScaleXnumberHorizontal scale factor applied to the element's transform.packages/core/src/context/types.ts:271
transformScaleYnumberVertical scale factor applied to the element's transform.packages/core/src/context/types.ts:273
translateXnumberHorizontal translation, in pixels, applied to the element's transform.packages/core/src/context/types.ts:267
translateYnumberVertical translation, in pixels, applied to the element's transform.packages/core/src/context/types.ts:269
zIndexnumberStacking order used to sort elements during rendering; higher values draw on top.packages/core/src/context/types.ts:265