Struct raui_core::layout::CoordsMapping  
source · pub struct CoordsMapping { /* private fields */ }Implementations§
source§impl CoordsMapping
 
impl CoordsMapping
pub fn new(real_area: Rect) -> Self
pub fn new_scaling(real_area: Rect, scaling: CoordsMappingScaling) -> Self
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§impl<'de> Deserialize<'de> for CoordsMapping
 
impl<'de> Deserialize<'de> for CoordsMapping
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for CoordsMapping
 
impl PartialEq 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
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