pub struct ExtractedBorder {
pub origin: Vec2,
pub size: Vec2,
pub widths: [f32; 4],
pub color: Color,
pub side_colors: Option<[Color; 4]>,
pub radius: f32,
pub corner_radii: Option<[f32; 4]>,
pub order: PaintOrder,
}Expand description
CSS border for one entity: per-side widths, one solid color, painted
between the outer border-box edge and the padding box (inside the
rect, unlike ExtractedOutline which strokes centered on the box
edge). Emitted by extract_borders at the entity’s own
PaintOrder; the IR builder pushes borders after rects, so at the
shared order key the border paints above the background fill and
below all descendants - CSS’s background -> border -> content order.
Fields§
§origin: Vec2Border-box top-left in window coordinates.
size: Vec2Border-box size.
widths: [f32; 4]Per-side widths [top, right, bottom, left] in logical pixels.
color: ColorSolid border color (all four sides).
side_colors: Option<[Color; 4]>Per-side color overrides [top, right, bottom, left]; None =
every side paints Self::color.
radius: f32Outer corner radius (matches the entity’s Visuals::radius).
corner_radii: Option<[f32; 4]>Per-corner outer radii [tl, tr, br, bl]; None = uniform.
order: PaintOrderGlobal paint order (see PaintOrder).
Trait Implementations§
Source§impl Clone for ExtractedBorder
impl Clone for ExtractedBorder
Source§fn clone(&self) -> ExtractedBorder
fn clone(&self) -> ExtractedBorder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for ExtractedBorder
impl Component for ExtractedBorder
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read more