[−][src]Struct skia_safe::Matrix
Methods
impl Matrix
[src]
pub fn new_scale((sx, sy): (scalar, scalar)) -> Matrix
[src]
pub fn new_trans(d: impl Into<Vector>) -> Matrix
[src]
pub fn new_all(
scale_x: scalar,
skew_x: scalar,
trans_x: scalar,
skew_y: scalar,
scale_y: scalar,
trans_y: scalar,
pers_0: scalar,
pers_1: scalar,
pers_2: scalar
) -> Matrix
[src]
scale_x: scalar,
skew_x: scalar,
trans_x: scalar,
skew_y: scalar,
scale_y: scalar,
trans_y: scalar,
pers_0: scalar,
pers_1: scalar,
pers_2: scalar
) -> Matrix
pub fn get_type(&self) -> TypeMask
[src]
pub fn is_identity(&self) -> bool
[src]
pub fn is_scale_translate(&self) -> bool
[src]
pub fn is_translate(&self) -> bool
[src]
pub fn rect_stays_rect(&self) -> bool
[src]
pub fn preserves_axis_alignment(&self) -> bool
[src]
pub fn has_perspective(&self) -> bool
[src]
pub fn is_similarity(&self) -> bool
[src]
pub fn preserves_right_angles(&self) -> bool
[src]
pub fn get_scale_x(&self) -> scalar
[src]
Deprecated since 0.12.0:
use scale_x()
pub fn scale_x(&self) -> scalar
[src]
pub fn get_scale_y(&self) -> scalar
[src]
Deprecated since 0.12.0:
use scale_y()
pub fn scale_y(&self) -> scalar
[src]
pub fn get_skew_y(&self) -> scalar
[src]
Deprecated since 0.12.0:
use skew_y()
pub fn skew_y(&self) -> scalar
[src]
pub fn get_skew_x(&self) -> scalar
[src]
Deprecated since 0.12.0:
use skew_x()
pub fn skew_x(&self) -> scalar
[src]
pub fn get_translate_x(&self) -> scalar
[src]
Deprecated since 0.12.0:
use translate_x()
pub fn translate_x(&self) -> scalar
[src]
pub fn get_translate_y(&self) -> scalar
[src]
Deprecated since 0.12.0:
use translate_y()
pub fn translate_y(&self) -> scalar
[src]
pub fn get_persp_x(&self) -> scalar
[src]
Deprecated since 0.12.0:
use persp_x()
pub fn persp_x(&self) -> scalar
[src]
pub fn get_persp_y(&self) -> scalar
[src]
Deprecated since 0.12.0:
use persp_y()
pub fn persp_y(&self) -> scalar
[src]
pub fn set_scale_x(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_scale_y(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_skew_y(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_skew_x(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_translate_x(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_translate_y(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_persp_x(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_persp_y(&mut self, v: scalar) -> &mut Self
[src]
pub fn set_all(
&mut self,
scale_x: scalar,
skew_x: scalar,
trans_x: scalar,
skew_y: scalar,
scale_y: scalar,
trans_y: scalar,
persp_0: scalar,
persp_1: scalar,
persp_2: scalar
) -> &mut Self
[src]
&mut self,
scale_x: scalar,
skew_x: scalar,
trans_x: scalar,
skew_y: scalar,
scale_y: scalar,
trans_y: scalar,
persp_0: scalar,
persp_1: scalar,
persp_2: scalar
) -> &mut Self
pub fn get_9(&self, buffer: &mut [scalar; 9])
[src]
pub fn set_9(&mut self, buffer: &[scalar; 9]) -> &mut Self
[src]
pub fn reset(&mut self) -> &mut Self
[src]
pub fn set_identity(&mut self) -> &mut Self
[src]
pub fn set_translate(&mut self, v: impl Into<Vector>) -> &mut Self
[src]
pub fn set_scale(
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn set_rotate(
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn set_sin_cos(
&mut self,
(sin_value, cos_value): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(sin_value, cos_value): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn set_rsxform(&mut self, rsxform: &RSXform) -> &mut Self
[src]
pub fn set_skew(
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn set_concat(&mut self, a: &Matrix, b: &Matrix) -> &mut Self
[src]
pub fn pre_translate(&mut self, delta: impl Into<Vector>) -> &mut Self
[src]
pub fn pre_scale(
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn pre_rotate(
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn pre_skew(
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn pre_concat(&mut self, other: &Matrix) -> &mut Self
[src]
pub fn post_translate(&mut self, delta: impl Into<Vector>) -> &mut Self
[src]
pub fn post_scale(
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(sx, sy): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn post_idiv(&mut self, (div_x, div_y): (i32, i32)) -> bool
[src]
pub fn post_rotate(
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
degrees: scalar,
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn post_skew(
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
[src]
&mut self,
(kx, ky): (scalar, scalar),
pivot: impl Into<Option<Point>>
) -> &mut Self
pub fn post_concat(&mut self, other: &Matrix) -> &mut Self
[src]
pub fn set_rect_to_rect(
&mut self,
src: impl AsRef<Rect>,
dst: impl AsRef<Rect>,
stf: ScaleToFit
) -> bool
[src]
&mut self,
src: impl AsRef<Rect>,
dst: impl AsRef<Rect>,
stf: ScaleToFit
) -> bool
pub fn from_rect_to_rect(
src: impl AsRef<Rect>,
dst: impl AsRef<Rect>,
stf: ScaleToFit
) -> Option<Matrix>
[src]
src: impl AsRef<Rect>,
dst: impl AsRef<Rect>,
stf: ScaleToFit
) -> Option<Matrix>
pub fn set_poly_to_poly(&mut self, src: &[Point], dst: &[Point]) -> bool
[src]
pub fn from_poly_to_poly(src: &[Point], dst: &[Point]) -> Option<Matrix>
[src]
#[must_use]
pub fn invert(&self) -> Option<Matrix>
[src]
pub fn set_affine_identity(affine: &mut [scalar; 6])
[src]
#[must_use]
pub fn as_affine(&self) -> Option<[scalar; 6]>
[src]
Deprecated since 0.12.0:
use to_affine()
#[must_use]
pub fn to_affine(&self) -> Option<[scalar; 6]>
[src]
pub fn set_affine(&mut self, affine: &[scalar; 6]) -> &mut Self
[src]
pub fn from_affine(affine: &[scalar; 6]) -> Matrix
[src]
pub fn map_points(&self, dst: &mut [Point], src: &[Point])
[src]
pub fn map_points_inplace(&self, pts: &mut [Point])
[src]
pub fn map_homogeneous_points(&self, dst: &mut [Point3], src: &[Point3])
[src]
pub fn map_xy(&self, x: scalar, y: scalar) -> Point
[src]
pub fn map_point(&self, point: impl Into<Point>) -> Point
[src]
pub fn map_vectors(&self, dst: &mut [Vector], src: &[Vector])
[src]
pub fn map_vectors_inplace(&self, vecs: &mut [Vector])
[src]
pub fn map_vector(&self, vec: impl Into<Vector>) -> Vector
[src]
pub fn map_rect(&self, rect: impl AsRef<Rect>) -> (Rect, bool)
[src]
pub fn map_rect_to_quad(&self, rect: impl AsRef<Rect>) -> [Point; 4]
[src]
pub fn map_rect_scale_translate(&self, src: impl AsRef<Rect>) -> Option<Rect>
[src]
pub fn map_radius(&self, radius: scalar) -> Option<scalar>
[src]
pub fn is_fixed_step_in_x(&self) -> bool
[src]
pub fn fixed_step_in_x(&self, y: scalar) -> Option<Vector>
[src]
pub fn cheap_equal_to(&self, other: &Matrix) -> bool
[src]
pub fn dump(&self)
[src]
pub fn min_scale(&self) -> scalar
[src]
pub fn max_scale(&self) -> scalar
[src]
pub fn min_max_scales(&self) -> (scalar, scalar)
[src]
pub fn decompose_scale(&self, remaining: Option<&mut Matrix>) -> Option<Size>
[src]
pub fn i() -> &'static Matrix
[src]
pub fn invalid_matrix() -> &'static Matrix
[src]
pub fn concat(a: &Matrix, b: &Matrix) -> Matrix
[src]
pub fn dirty_matrix_type_cache(&mut self)
[src]
pub fn set_scale_translate(
&mut self,
(sx, sy): (scalar, scalar),
t: impl Into<Vector>
) -> &mut Self
[src]
&mut self,
(sx, sy): (scalar, scalar),
t: impl Into<Vector>
) -> &mut Self
pub fn is_finite(&self) -> bool
[src]
pub fn new_identity() -> Self
[src]
Trait Implementations
impl Default for Matrix
[src]
impl Into<Matrix> for Matrix44
[src]
impl Clone for Matrix
[src]
impl PartialEq<Matrix> for Matrix
[src]
impl Copy for Matrix
[src]
impl Index<Member> for Matrix
[src]
type Output = scalar
The returned type after indexing.
fn index(&self, index: Member) -> &Self::Output
[src]
impl Index<AffineMember> for Matrix
[src]
type Output = scalar
The returned type after indexing.
fn index(&self, index: AffineMember) -> &Self::Output
[src]
impl Index<usize> for Matrix
[src]
type Output = scalar
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl IndexMut<Member> for Matrix
[src]
impl IndexMut<AffineMember> for Matrix
[src]
fn index_mut(&mut self, index: AffineMember) -> &mut Self::Output
[src]
impl IndexMut<usize> for Matrix
[src]
impl Debug for Matrix
[src]
Auto Trait Implementations
impl Unpin for Matrix
impl Sync for Matrix
impl Send for Matrix
impl UnwindSafe for Matrix
impl RefUnwindSafe for Matrix
Blanket Implementations
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> From<T> for 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.
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,