Struct oxygengine_user_interface::raui::core::layout::CoordsMapping
source · [−]pub struct CoordsMapping { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for CoordsMapping
impl Clone for CoordsMapping
sourcefn clone(&self) -> CoordsMapping
fn clone(&self) -> CoordsMapping
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CoordsMapping
impl Debug for CoordsMapping
sourceimpl Default for CoordsMapping
impl Default for CoordsMapping
sourcefn default() -> CoordsMapping
fn default() -> CoordsMapping
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CoordsMapping
impl<'de> Deserialize<'de> for CoordsMapping
sourcefn 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
sourceimpl PartialEq<CoordsMapping> for CoordsMapping
impl PartialEq<CoordsMapping> for CoordsMapping
sourcefn eq(&self, other: &CoordsMapping) -> bool
fn eq(&self, other: &CoordsMapping) -> bool
sourceimpl Serialize for CoordsMapping
impl Serialize for CoordsMapping
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more