Struct me3_framework::overlay::epaint::emath::RectTransform
source · [−]#[repr(C)]pub struct RectTransform { /* private fields */ }
Expand description
Linearly transforms positions from one Rect
to another.
RectTransform
stores the rectangles, and therefore supports clamping and culling.
Implementations
sourceimpl RectTransform
impl RectTransform
pub fn identity(from_and_to: Rect) -> RectTransform
pub fn from_to(from: Rect, to: Rect) -> RectTransform
pub fn from(&self) -> &Rect
pub fn to(&self) -> &Rect
pub fn inverse(&self) -> RectTransform
sourcepub fn transform_pos(&self, pos: Pos2) -> Pos2
pub fn transform_pos(&self, pos: Pos2) -> Pos2
Transforms the given coordinate in the from
space to the to
space.
sourcepub fn transform_rect(&self, rect: Rect) -> Rect
pub fn transform_rect(&self, rect: Rect) -> Rect
Transforms the given rectangle in the in
-space to a rectangle in the out
-space.
sourcepub fn transform_pos_clamped(&self, pos: Pos2) -> Pos2
pub fn transform_pos_clamped(&self, pos: Pos2) -> Pos2
Transforms the given coordinate in the from
space to the to
space,
clamping if necessary.
Trait Implementations
sourceimpl Clone for RectTransform
impl Clone for RectTransform
sourcefn clone(&self) -> RectTransform
fn clone(&self) -> RectTransform
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RectTransform
impl Debug for RectTransform
sourceimpl Mul<Pos2> for &RectTransform
impl Mul<Pos2> for &RectTransform
Transforms the position.
sourceimpl Mul<Pos2> for RectTransform
impl Mul<Pos2> for RectTransform
Transforms the position.
sourceimpl PartialEq<RectTransform> for RectTransform
impl PartialEq<RectTransform> for RectTransform
sourcefn eq(&self, other: &RectTransform) -> bool
fn eq(&self, other: &RectTransform) -> bool
impl Copy for RectTransform
impl StructuralPartialEq for RectTransform
Auto Trait Implementations
impl RefUnwindSafe for RectTransform
impl Send for RectTransform
impl Sync for RectTransform
impl Unpin for RectTransform
impl UnwindSafe for RectTransform
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