[−][src]Struct femtovg::Transform2D
2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling.
Implementations
impl Transform2D
[src]
pub fn identity() -> Self
[src]
Creates an identity transformation with no translation, rotation or scaling applied.
pub fn new_translation(x: f32, y: f32) -> Self
[src]
pub fn translate(&mut self, tx: f32, ty: f32)
[src]
pub fn scale(&mut self, sx: f32, sy: f32)
[src]
pub fn rotate(&mut self, a: f32)
[src]
pub fn skew_x(&mut self, a: f32)
[src]
pub fn skew_y(&mut self, a: f32)
[src]
pub fn multiply(&mut self, other: &Self)
[src]
pub fn premultiply(&mut self, other: &Self)
[src]
pub fn inverse(&mut self)
[src]
pub fn inversed(&self) -> Self
[src]
pub fn transform_point(&self, sx: f32, sy: f32) -> (f32, f32)
[src]
pub fn average_scale(&self) -> f32
[src]
pub fn to_mat3x4(self) -> [f32; 12]
[src]
pub fn cache_key(&self) -> u64
[src]
Trait Implementations
impl Clone for Transform2D
[src]
pub fn clone(&self) -> Transform2D
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Transform2D
[src]
impl Debug for Transform2D
[src]
impl Default for Transform2D
[src]
impl Index<usize> for Transform2D
[src]
type Output = f32
The returned type after indexing.
pub fn index(&self, index: usize) -> &Self::Output
[src]
impl IndexMut<usize> for Transform2D
[src]
impl PartialEq<Transform2D> for Transform2D
[src]
pub fn eq(&self, other: &Transform2D) -> bool
[src]
pub fn ne(&self, other: &Transform2D) -> bool
[src]
impl PartialOrd<Transform2D> for Transform2D
[src]
pub fn partial_cmp(&self, other: &Transform2D) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Transform2D) -> bool
[src]
pub fn le(&self, other: &Transform2D) -> bool
[src]
pub fn gt(&self, other: &Transform2D) -> bool
[src]
pub fn ge(&self, other: &Transform2D) -> bool
[src]
impl StructuralPartialEq for Transform2D
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transform2D
[src]
impl Send for Transform2D
[src]
impl Sync for Transform2D
[src]
impl Unpin for Transform2D
[src]
impl UnwindSafe for Transform2D
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,