Expand description
The backgroundImage style wire types and their totalizing decoder.
Structs§
- Atlas
Spec - A uniform sprite-sheet grid plus the selected cell. Mirrors
TextureAtlasLayout::from_grid(tile size, columns, rows, optional padding / offset, all in source-texture pixels) +TextureAtlas.index. Bevy-free; turned into a cachedTextureAtlasLayoutasset inui_map. - Background
Image Spec - The decoded
backgroundImagestyle object. Deliberately NOTImageMode: that type admits"auto"(whose intrinsic-size measure drives layout — a background must never do that) and"sliced", and its unknown-keyword fallback isAuto. This spec’s modes all map to layout-inertNodeImageModes. - Slice
Spec - 9-slice scaling parameters, mirroring
bevy_sprite::TextureSlicer. - Source
Rect - A source sub-rect in texture pixels: top-left (
x,y) pluswidth/height. Converted to abevy_math::Rect(min/max corners) inui_map. - Tiled
Spec "tiled"scaling: the whole image repeats once stretched beyondstretch_value.
Enums§
- Background
Image Mode BackgroundImageSpec::modekeywords. Every variant maps to a layout-inertNodeImageMode(StretchorTiled) — neverAuto.- Background
Image Source - Where a
super::style::Style::background_imagesamples from: a bare string is an asset path (AssetServer-loaded, like animageelement’ssrc); the{ texture }object names an app-registered texture incrate::portal::RenderTargets(typicallyRenderTargets::register— bound late: an unknown name shows the transparent placeholder until the app registers it). Texture backgrounds are for static content — they don’t participate in live-repaint tracking; continuously-updating render targets belong in a<portal>element. - Image
Mode - How an
imagefits its node. A bare string ("auto"/"stretch") maps to the trivialbevy_uimodes; thetype-tagged object forms map to bevy’s 9-slice ("sliced") and"tiled"scaling. Bevy-free; converted toNodeImageModeinui_map. - Image
Mode Spec - The object forms of
ImageMode, discriminated by theirtypefield. - Slice
Border - 9-slice border insets: a single number (uniform) or per-side, in source-texture pixels.
- Slice
Scale - How a 9-slice section scales when resized:
"stretch"(the keyword) or{ tile }, wheretileis the repeatstretch_value.