Struct oxygengine_user_interface::raui::core::layout::CoordsMapping
source · pub struct CoordsMapping { /* private fields */ }
Implementations§
source§impl CoordsMapping
impl CoordsMapping
pub fn new(real_area: Rect) -> CoordsMapping
pub fn new_scaling( real_area: Rect, scaling: CoordsMappingScaling ) -> CoordsMapping
pub fn scale(&self) -> Vec2
pub fn offset(&self) -> Vec2
pub fn virtual_area(&self) -> Rect
pub fn virtual_to_real_vec2(&self, coord: Vec2, local_space: bool) -> Vec2
pub fn real_to_virtual_vec2(&self, coord: Vec2, local_space: bool) -> Vec2
pub fn virtual_to_real_rect(&self, area: Rect, local_space: bool) -> Rect
pub fn real_to_virtual_rect(&self, area: Rect, local_space: bool) -> Rect
Trait Implementations§
source§impl Clone for CoordsMapping
impl Clone for CoordsMapping
source§fn clone(&self) -> CoordsMapping
fn clone(&self) -> CoordsMapping
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CoordsMapping
impl Debug for CoordsMapping
source§impl Default for CoordsMapping
impl Default for CoordsMapping
source§fn default() -> CoordsMapping
fn default() -> CoordsMapping
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CoordsMapping
impl<'de> Deserialize<'de> for CoordsMapping
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<CoordsMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<CoordsMapping, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<CoordsMapping> for CoordsMapping
impl PartialEq<CoordsMapping> for CoordsMapping
source§fn eq(&self, other: &CoordsMapping) -> bool
fn eq(&self, other: &CoordsMapping) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CoordsMapping
impl Serialize for CoordsMapping
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CoordsMapping
Auto Trait Implementations§
impl RefUnwindSafe for CoordsMapping
impl Send for CoordsMapping
impl Sync for CoordsMapping
impl Unpin for CoordsMapping
impl UnwindSafe for CoordsMapping
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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more