Struct usvg::Transform

source ·
pub struct Transform {
    pub a: f64,
    pub b: f64,
    pub c: f64,
    pub d: f64,
    pub e: f64,
    pub f: f64,
}
Expand description

Representation of the <transform> type.

Fields

a: f64b: f64c: f64d: f64e: f64f: f64

Implementations

Constructs a new transform.

Constructs a new translate transform.

Constructs a new scale transform.

Constructs a new rotate transform.

Constructs a new rotate transform at the specified position.

Constructs a new skew transform along then X axis.

Constructs a new skew transform along then Y axis.

Translates the current transform.

Scales the current transform.

Rotates the current transform.

Rotates the current transform at the specified position.

Skews the current transform along the X axis.

Skews the current transform along the Y axis.

Appends transform to the current transform.

Returns true if the transform is default, aka (1 0 0 1 0 0).

Returns true if the transform contains only translate part, aka (1 0 0 1 x y).

Returns true if the transform contains only scale part, aka (sx 0 0 sy 0 0).

Returns true if the transform contains translate part.

Returns true if the transform contains scale part.

Returns true if the transform scale is proportional.

The proportional scale is when <sx> equal to <sy>.

Returns true if the transform contains skew part.

Returns true if the transform contains rotate part.

Returns transform’s translate part.

Returns transform’s scale part.

Returns transform’s skew part.

Returns transform’s rotate part.

Applies transform to selected coordinates.

Applies transform to selected coordinates.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Returns true if values are approximately equal.
Returns true if values are not approximately equal.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Writes data to the Vec<u8> buffer using specified WriteOptions.
Writes data to the Vec<u8> buffer using default WriteOptions.
Returns an object that implements fmt::Display using provided write options.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.