Skip to main content

Module visual

Module visual 

Source
Expand description

Visual spec wire types: outline, shadows, line metrics, gradients, and per-side border colors.

Structs§

AngularStop
A single color stop for a conic gradient. angle is the stop’s angle in degrees (absent → auto-spaced); hint as in GradientStop.
BorderColorSpec
Border color: a single CSS color applied to all four sides, or a { top, right, bottom, left } object setting sides individually. Omitted sides decode to None (painted transparent — bevy’s BorderColor default).
BoxShadowSpec
A single drop shadow.
ConicGradientSpec
GradientStop
A single color stop for a linear/radial gradient. position is where the color sits along the gradient line (a Length); absent → auto-spaced. hint is the 0.0..=1.0 interpolation midpoint between this stop and the next (default 0.5).
LinearGradientSpec
OutlineSpec
Outline drawn around (outside) the node’s border box.
RadialGradientSpec
TextShadowSpec
A single text drop shadow. offsetX/offsetY are displacement in logical pixels (absent → bevy’s default of 4.0); color defaults to bevy’s translucent black when unset.

Enums§

BoxShadowList
A boxShadow value: one shadow or a stacked list (CSS box-shadow: a, b, …).
GradientList
A backgroundGradient/borderGradient value: one gradient or a layered list.
GradientSpec
One gradient, discriminated by its type field on the wire.
LetterSpacingSpec
Letter spacing for a <text>. A bare number is logical pixels; a string carries a unit ("2px", "0.1rem"/"0.1em" for a font-size multiple, or "normal"); { "rem": n } is a multiple of the font size (legacy object form).
LineHeightSpec
Line height for a <text>. A bare number is a multiple of the font size (RelativeToFont); a string carries a unit ("20px" absolute, "1.5" / "1.5em" a multiple); { "px": n } is an absolute pixel height (legacy object form).
RadialShapeSpec
The size/shape of a radial gradient. Either a keyword ("closestSide" | "farthestSide" | "closestCorner" | "farthestCorner", default "closestCorner") or an explicit { circle } / { ellipse }.

Type Aliases§

ColorSpace
Color space the gradient interpolates in ("oklab" (default), "oklch", "oklchLong", "srgb", "linearRgb", "hsl", "hslLong", "hsv", "hsvLong").
GradientPosition
Radial/conic gradient center, given as a named anchor ("center", "top", "topLeft", …). Arbitrary Val-offset centers are not yet supported.