[−][src]Struct blend2d::matrix::Matrix2D
A Row-Major 2d matrix.
Methods
impl Matrix2D
[src]
pub fn new(m00: f64, m01: f64, m10: f64, m11: f64, m20: f64, m21: f64) -> Self
[src]
Creates a new matrix.
pub fn identity() -> Matrix2D
[src]
Creates an identity matrix.
pub fn translation(x: f64, y: f64) -> Matrix2D
[src]
Creates a translation matrix.
pub fn translation_point<P: Point>(p: &P) -> Matrix2D
[src]
Creates a translation matrix.
pub fn scaling(x: f64, y: f64) -> Matrix2D
[src]
Creates a scaling matrix.
pub fn scaling_point<P: Point>(p: &P) -> Matrix2D
[src]
Creates a scaling matrix.
pub fn rotation(angle: f64, x: f64, y: f64) -> Matrix2D
[src]
Creates a rotation matrix.
pub fn rotation_point<P: Point>(angle: f64, p: &P) -> Matrix2D
[src]
Creates a rotation matrix.
pub fn skewing(x: f64, y: f64) -> Matrix2D
[src]
Creates a skewing matrix.
pub fn skewing_point<P: Point>(p: &P) -> Matrix2D
[src]
Creates a skewing matrix.
pub fn sin_cos(sin: f64, cos: f64, tx: f64, ty: f64) -> Matrix2D
[src]
pub fn sin_cos_point<P: Point>(sin: f64, cos: f64, t: &P) -> Matrix2D
[src]
pub fn reset(&mut self)
[src]
Resets the matrix to the identity matrix.
pub fn reset_to_translation(&mut self, x: f64, y: f64)
[src]
Resets the matrix to a translation matrix.
pub fn reset_to_translation_point<P: Point>(&mut self, p: &P)
[src]
Resets the matrix to a translation matrix.
pub fn reset_to_scaling(&mut self, x: f64, y: f64)
[src]
Resets the matrix to a scaling matrix.
pub fn reset_to_scaling_point<P: Point>(&mut self, p: &P)
[src]
Resets the matrix to a scaling matrix.
pub fn reset_to_skewing(&mut self, x: f64, y: f64)
[src]
Resets the matrix to a skewing matrix.
pub fn reset_to_skewing_point<P: Point>(&mut self, p: &P)
[src]
Resets the matrix to a skewing matrix.
pub fn reset_to_sin_cos(&mut self, sin: f64, cos: f64, tx: f64, ty: f64)
[src]
pub fn reset_to_sin_cos_point<P: Point>(&mut self, sin: f64, cos: f64, t: &P)
[src]
pub fn reset_to_rotation(&mut self, angle: f64, x: f64, y: f64)
[src]
Resets the matrix to a rotation matrix.
pub fn reset_to_rotation_point<P: Point>(&mut self, angle: f64, p: &P)
[src]
Resets the matrix to a rotation matrix.
Trait Implementations
impl MatrixTransform for Matrix2D
[src]
fn set_matrix(&mut self, m: &Matrix2D)
[src]
Set the transformation matrix of this type to m.
fn reset_matrix(&mut self)
[src]
Reset the transformation matrix.
fn translate(&mut self, x: f64, y: f64)
[src]
Translate the transformation matrix.
fn translate_point<P: Point>(&mut self, p: &P)
[src]
Translate the transformation matrix.
fn scale(&mut self, x: f64, y: f64)
[src]
Scale the transformation matrix.
fn scale_point<P: Point>(&mut self, p: &P)
[src]
Scale the transformation matrix.
fn skew(&mut self, x: f64, y: f64)
[src]
Skew the transformation matrix.
fn skew_point<P: Point>(&mut self, p: &P)
[src]
Skew the transformation matrix.
fn rotate(&mut self, angle: f64)
[src]
Rotate the transformation matrix.
fn rotate_around(&mut self, angle: f64, x: f64, y: f64)
[src]
Rotate the transformation matrix around a point.
fn rotate_around_point<P: Point>(&mut self, angle: f64, p: &P)
[src]
Rotate the transformation matrix around a point.
fn transform(&mut self, mat: &Matrix2D)
[src]
Transform the transformation matrix.
fn post_translate(&mut self, x: f64, y: f64)
[src]
Post-translate the transformation matrix.
fn post_translate_point<P: Point>(&mut self, p: &P)
[src]
Post-translate the transformation matrix.
fn post_scale(&mut self, x: f64, y: f64)
[src]
Post-scale the transformation matrix.
fn post_scale_point<P: Point>(&mut self, p: &P)
[src]
Post-scale the transformation matrix.
fn post_skew(&mut self, x: f64, y: f64)
[src]
Post-skew the transformation matrix.
fn post_skew_point<P: Point>(&mut self, p: &P)
[src]
Post-skew the transformation matrix.
fn post_rotate(&mut self, angle: f64)
[src]
Post-rotate the transformation matrix.
fn post_rotate_around(&mut self, angle: f64, x: f64, y: f64)
[src]
Post-rotate the transformation matrix around a point.
fn post_rotate_around_point<P: Point>(&mut self, angle: f64, p: &P)
[src]
Post-rotate the transformation matrix around a point.
fn post_transform(&mut self, mat: &Matrix2D)
[src]
Post-transform the transformation matrix.
impl PartialEq<Matrix2D> for Matrix2D
[src]
impl Clone for Matrix2D
[src]
fn clone(&self) -> Matrix2D
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Matrix2D
[src]
impl Copy for Matrix2D
[src]
impl Debug for Matrix2D
[src]
Auto Trait Implementations
impl Unpin for Matrix2D
impl Sync for Matrix2D
impl Send for Matrix2D
impl RefUnwindSafe for Matrix2D
impl UnwindSafe for Matrix2D
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,