pub struct UiTransform {
pub pos: Vec2,
pub size: Vec2,
pub z_index: i32,
}Expand description
The computed screen-space transform of a UI element.
This is populated by the layout system (e.g. UiAgent) after evaluating the taffy tree.
Fields§
§pos: Vec2Absolute position of the top-left corner in screen coordinates
size: Vec2Absolute size in screen coordinates
z_index: i32The Z-index for rendering order. Higher values are rendered on top.
Implementations§
Trait Implementations§
Source§impl Clone for UiTransform
impl Clone for UiTransform
Source§fn clone(&self) -> UiTransform
fn clone(&self) -> UiTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Component for UiTransform
impl Component for UiTransform
Source§fn make_column() -> Box<dyn AnyVec>where
Self: Sized,
fn make_column() -> Box<dyn AnyVec>where
Self: Sized,
Creates this component’s empty storage column. Default: an AoS
Vec<Self>.Source§fn push_into_column(self, column: &mut dyn AnyVec)where
Self: Sized,
fn push_into_column(self, column: &mut dyn AnyVec)where
Self: Sized,
Appends
self as a new row into its column. Read moreSource§fn copy_row_between(src: &dyn AnyVec, src_row: usize, dst: &mut dyn AnyVec)where
Self: Sized,
fn copy_row_between(src: &dyn AnyVec, src_row: usize, dst: &mut dyn AnyVec)where
Self: Sized,
Clones row
src_row from src into dst (used when an entity migrates
between pages on a structural change). Both columns are this component’s
column type. Read moreSource§fn clone_from_column(column: &dyn AnyVec, row: usize) -> Selfwhere
Self: Sized,
fn clone_from_column(column: &dyn AnyVec, row: usize) -> Selfwhere
Self: Sized,
Reads row
row of column as an owned value — the uniform by-value
access path that works for both AoS (clone the &T) and field-SoA
(gather the fields) layouts. Used by World::clone_component, the
Soa<T> query, and the serialization recipe. Read moreSource§impl Debug for UiTransform
impl Debug for UiTransform
Source§impl Default for UiTransform
impl Default for UiTransform
Source§impl From<UiTransform> for UiTransform
impl From<UiTransform> for UiTransform
Source§fn from(t: UiTransform) -> Self
fn from(t: UiTransform) -> Self
Converts to this type from the input type.
Source§impl From<UiTransform> for UiTransform
impl From<UiTransform> for UiTransform
Source§impl PartialEq for UiTransform
impl PartialEq for UiTransform
Source§fn eq(&self, other: &UiTransform) -> bool
fn eq(&self, other: &UiTransform) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for UiTransform
impl StructuralPartialEq for UiTransform
Auto Trait Implementations§
impl Freeze for UiTransform
impl RefUnwindSafe for UiTransform
impl Send for UiTransform
impl Sync for UiTransform
impl Unpin for UiTransform
impl UnsafeUnpin for UiTransform
impl UnwindSafe for UiTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C1> ComponentBundle for C1where
C1: Component,
impl<C1> ComponentBundle for C1where
C1: Component,
Source§fn type_ids() -> Vec<TypeId>
fn type_ids() -> Vec<TypeId>
Returns the sorted list of
TypeIds for the components in this bundle. Read moreSource§fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
Creates the set of empty, type-erased
Vec<T> columns required to store
this bundle’s components. Read moreSource§fn update_metadata(
metadata: &mut EntityMetadata,
location: PageIndex,
registry: &ComponentRegistry,
)
fn update_metadata( metadata: &mut EntityMetadata, location: PageIndex, registry: &ComponentRegistry, )
Updates the appropriate fields in an
EntityMetadata struct to point
to the location of this bundle’s data. Read moreSource§unsafe fn add_to_page(self, page: &mut ComponentPage)
unsafe fn add_to_page(self, page: &mut ComponentPage)
Adds the components from this bundle into the specified
ComponentPage. Read more