Struct pixman::FTransform
source · pub struct FTransform(/* private fields */);Expand description
Floating-point transform
Implementations§
source§impl FTransform
impl FTransform
sourcepub fn transform_bounds(&self, b: Box16) -> Option<Box16>
pub fn transform_bounds(&self, b: Box16) -> Option<Box16>
Transform the provided bounds
sourcepub fn multiply(&self, other: &FTransform) -> Self
pub fn multiply(&self, other: &FTransform) -> Self
Multiply this transform with the provided transform
sourcepub fn transform_point(&self, vector: FVector) -> Option<FVector>
pub fn transform_point(&self, vector: FVector) -> Option<FVector>
Transform the given point
sourcepub fn transform_point_3d(&self, vector: FVector) -> FVector
pub fn transform_point_3d(&self, vector: FVector) -> FVector
Transform the given point
source§impl FTransform
impl FTransform
sourcepub fn from_rotation(cos: f64, sin: f64) -> Self
pub fn from_rotation(cos: f64, sin: f64) -> Self
Initialize a transform from a rotation
sourcepub fn from_scale(sx: f64, sy: f64) -> Self
pub fn from_scale(sx: f64, sy: f64) -> Self
Initialize a transform from a scale
sourcepub fn from_translation(tx: f64, ty: f64) -> Self
pub fn from_translation(tx: f64, ty: f64) -> Self
Initialize a transform from a translation
sourcepub fn rotate(self, c: f64, s: f64, reverse: bool) -> Option<Self>
pub fn rotate(self, c: f64, s: f64, reverse: bool) -> Option<Self>
Add a rotation to this transform
sourcepub fn scale(self, sx: f64, sy: f64, reverse: bool) -> Option<Self>
pub fn scale(self, sx: f64, sy: f64, reverse: bool) -> Option<Self>
Add a scale to this transform
Trait Implementations§
source§impl Clone for FTransform
impl Clone for FTransform
source§fn clone(&self) -> FTransform
fn clone(&self) -> FTransform
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for FTransform
impl Debug for FTransform
source§impl From<FTransform> for pixman_f_transform_t
impl From<FTransform> for pixman_f_transform_t
source§fn from(value: FTransform) -> Self
fn from(value: FTransform) -> Self
Converts to this type from the input type.
source§impl From<Transform> for FTransform
impl From<Transform> for FTransform
source§impl From<pixman_f_transform> for FTransform
impl From<pixman_f_transform> for FTransform
source§fn from(value: pixman_f_transform_t) -> Self
fn from(value: pixman_f_transform_t) -> Self
Converts to this type from the input type.
source§impl TryFrom<FTransform> for Transform
impl TryFrom<FTransform> for Transform
§type Error = TransformConvertError
type Error = TransformConvertError
The type returned in the event of a conversion error.
impl Copy for FTransform
Auto Trait Implementations§
impl RefUnwindSafe for FTransform
impl Send for FTransform
impl Sync for FTransform
impl Unpin for FTransform
impl UnwindSafe for FTransform
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