#[repr(transparent)]pub struct Transform { /* private fields */ }Implementations
sourceimpl Transform
impl Transform
pub fn new() -> Transform
pub fn category(&self) -> TransformCategory
pub fn invert(&self) -> Option<Transform>
pub fn matrix(&self, matrix: &Matrix) -> Transform
pub fn perspective(&self, depth: f32) -> Transform
pub fn rotate(&self, angle: f32) -> Option<Transform>
pub fn rotate_3d(&self, angle: f32, axis: &Vec3) -> Option<Transform>
pub fn scale(&self, factor_x: f32, factor_y: f32) -> Option<Transform>
pub fn scale_3d(
&self,
factor_x: f32,
factor_y: f32,
factor_z: f32
) -> Option<Transform>
pub fn skew(&self, skew_x: f32, skew_y: f32) -> Option<Transform>
Available on crate feature
v4_6 only.pub fn to_2d(&self) -> (f32, f32, f32, f32, f32, f32)
pub fn to_2d_components(&self) -> (f32, f32, f32, f32, f32, f32, f32)
Available on crate feature
v4_6 only.pub fn to_affine(&self) -> (f32, f32, f32, f32)
pub fn to_matrix(&self) -> Matrix
pub fn to_str(&self) -> GString
pub fn to_translate(&self) -> (f32, f32)
pub fn transform(&self, other: Option<&Transform>) -> Option<Transform>
pub fn transform_bounds(&self, rect: &Rect) -> Rect
pub fn transform_point(&self, point: &Point) -> Point
pub fn translate(&self, point: &Point) -> Option<Transform>
pub fn translate_3d(&self, point: &Point3D) -> Option<Transform>
Trait Implementations
sourceimpl Ord for Transform
impl Ord for Transform
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Transform> for Transform
impl PartialEq<Transform> for Transform
sourceimpl PartialOrd<Transform> for Transform
impl PartialOrd<Transform> for Transform
sourcefn partial_cmp(&self, other: &Transform) -> Option<Ordering>
fn partial_cmp(&self, other: &Transform) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl StaticType for Transform
impl StaticType for Transform
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self.
impl Eq for Transform
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl !Send for Transform
impl !Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.