pub struct ProjectiveTransform { /* private fields */ }Implementations§
Source§impl ProjectiveTransform
impl ProjectiveTransform
pub const fn identity() -> Self
pub fn translation(tx: f32, ty: f32) -> Self
pub fn from_rect_to_quad(rect: Rect, quad: [[f32; 2]; 4]) -> Self
Sourcepub fn then(self, next: Self) -> Self
pub fn then(self, next: Self) -> Self
Returns the composed transform that applies self first and next second.
pub fn inverse(self) -> Option<Self>
pub fn matrix(self) -> [[f32; 3]; 3]
pub fn map_point(self, point: Point) -> Point
pub fn map_rect(self, rect: Rect) -> [[f32; 2]; 4]
pub fn bounds_for_rect(self, rect: Rect) -> Rect
Trait Implementations§
Source§impl Clone for ProjectiveTransform
impl Clone for ProjectiveTransform
Source§fn clone(&self) -> ProjectiveTransform
fn clone(&self) -> ProjectiveTransform
Returns a duplicate 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 ProjectiveTransform
impl Debug for ProjectiveTransform
Source§impl Default for ProjectiveTransform
impl Default for ProjectiveTransform
Source§impl PartialEq for ProjectiveTransform
impl PartialEq for ProjectiveTransform
impl Copy for ProjectiveTransform
impl StructuralPartialEq for ProjectiveTransform
Auto Trait Implementations§
impl Freeze for ProjectiveTransform
impl RefUnwindSafe for ProjectiveTransform
impl Send for ProjectiveTransform
impl Sync for ProjectiveTransform
impl Unpin for ProjectiveTransform
impl UnsafeUnpin for ProjectiveTransform
impl UnwindSafe for ProjectiveTransform
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