Struct bevy_retrograde_epaint::emath::RectTransform [−]
pub struct RectTransform { /* fields omitted */ }
Expand description
Linearly transforms positions from one Rect
to another.
RectTransform
stores the rectangles, and therefore supports clamping and culling.
Implementations
impl RectTransform
impl RectTransform
pub fn identity(from_and_to: Rect) -> RectTransform
pub fn from_to(from: Rect, to: Rect) -> RectTransform
pub fn inverse(&self) -> RectTransform
pub 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.
pub 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.
pub 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
impl Clone for RectTransform
impl Clone for RectTransform
pub fn clone(&self) -> RectTransform
pub fn clone(&self) -> RectTransform
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for RectTransform
impl Debug for RectTransform
impl<'_> Mul<Pos2> for &'_ RectTransform
impl<'_> Mul<Pos2> for &'_ RectTransform
Transforms the position.
impl Mul<Pos2> for RectTransform
impl Mul<Pos2> for RectTransform
Transforms the position.
impl PartialEq<RectTransform> for RectTransform
impl PartialEq<RectTransform> for RectTransform
pub fn eq(&self, other: &RectTransform) -> bool
pub fn eq(&self, other: &RectTransform) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &RectTransform) -> bool
pub fn ne(&self, other: &RectTransform) -> bool
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V