pub struct Matrix(/* private fields */);
Implementations§
Source§impl Matrix
impl Matrix
pub fn identity() -> Self
pub fn new(xx: f64, yx: f64, xy: f64, yy: f64, x0: f64, y0: f64) -> Self
pub fn xx(&self) -> f64
pub fn set_xx(&mut self, xx: f64)
pub fn yx(&self) -> f64
pub fn set_yx(&mut self, yx: f64)
pub fn xy(&self) -> f64
pub fn set_xy(&mut self, xy: f64)
pub fn yy(&self) -> f64
pub fn set_yy(&mut self, yy: f64)
pub fn x0(&self) -> f64
pub fn set_x0(&mut self, x0: f64)
pub fn y0(&self) -> f64
pub fn set_y0(&mut self, y0: f64)
pub fn multiply(left: &Matrix, right: &Matrix) -> Matrix
pub fn translate(&mut self, tx: f64, ty: f64)
pub fn scale(&mut self, sx: f64, sy: f64)
pub fn rotate(&mut self, angle: f64)
pub fn invert(&mut self)
pub fn try_invert(&self) -> Result<Matrix, Error>
pub fn transform_distance(&self, _dx: f64, _dy: f64) -> (f64, f64)
pub fn transform_point(&self, _x: f64, _y: f64) -> (f64, f64)
Trait Implementations§
Source§impl<'a> FromValue<'a> for &'a Matrix
impl<'a> FromValue<'a> for &'a Matrix
Source§type Checker = GenericValueTypeOrNoneChecker<&'a Matrix>
type Checker = GenericValueTypeOrNoneChecker<&'a Matrix>
Value type checker.
Source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moreSource§impl<'a> FromValue<'a> for Matrix
impl<'a> FromValue<'a> for Matrix
Source§type Checker = GenericValueTypeOrNoneChecker<Matrix>
type Checker = GenericValueTypeOrNoneChecker<Matrix>
Value type checker.
Source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moreSource§impl StaticType for Matrix
impl StaticType for Matrix
Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.Source§impl ToValueOptional for Matrix
impl ToValueOptional for Matrix
Source§fn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an
Option
to a Value
.impl Copy for Matrix
impl StructuralPartialEq for Matrix
impl ValueTypeOptional for Matrix
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.