Enum parcel_css::properties::transform::Transform
source · [−]pub enum Transform {
Show 21 variants
Translate(LengthPercentage, LengthPercentage),
TranslateX(LengthPercentage),
TranslateY(LengthPercentage),
TranslateZ(Length),
Translate3d(LengthPercentage, LengthPercentage, Length),
Scale(NumberOrPercentage, NumberOrPercentage),
ScaleX(NumberOrPercentage),
ScaleY(NumberOrPercentage),
ScaleZ(NumberOrPercentage),
Scale3d(NumberOrPercentage, NumberOrPercentage, NumberOrPercentage),
Rotate(Angle),
RotateX(Angle),
RotateY(Angle),
RotateZ(Angle),
Rotate3d(f32, f32, f32, Angle),
Skew(Angle, Angle),
SkewX(Angle),
SkewY(Angle),
Perspective(Length),
Matrix(Matrix<f32>),
Matrix3d(Matrix3d<f32>),
}
Expand description
An individual transform function.
Variants
Translate(LengthPercentage, LengthPercentage)
A 2D translation.
TranslateX(LengthPercentage)
A translation in the X direction.
TranslateY(LengthPercentage)
A translation in the Y direction.
TranslateZ(Length)
A translation in the Z direction.
Translate3d(LengthPercentage, LengthPercentage, Length)
A 3D translation.
Scale(NumberOrPercentage, NumberOrPercentage)
A 2D scale.
ScaleX(NumberOrPercentage)
A scale in the X direction.
ScaleY(NumberOrPercentage)
A scale in the Y direction.
ScaleZ(NumberOrPercentage)
A scale in the Z direction.
Scale3d(NumberOrPercentage, NumberOrPercentage, NumberOrPercentage)
A 3D scale.
Rotate(Angle)
A 2D rotation.
RotateX(Angle)
A rotation around the X axis.
RotateY(Angle)
A rotation around the Y axis.
RotateZ(Angle)
A rotation around the Z axis.
Rotate3d(f32, f32, f32, Angle)
A 3D rotation.
Skew(Angle, Angle)
A 2D skew.
SkewX(Angle)
A skew along the X axis.
SkewY(Angle)
A skew along the Y axis.
Perspective(Length)
A perspective transform.
Matrix(Matrix<f32>)
A 2D matrix transform.
Matrix3d(Matrix3d<f32>)
A 3D matrix transform.
Implementations
Trait Implementations
sourceimpl<'i> Parse<'i> for Transform
impl<'i> Parse<'i> for Transform
sourcefn parse<'t>(
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse<'t>(
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value of this type using an existing parser.
sourcefn parse_string(input: &'i str) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse_string(input: &'i str) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value from a string. Read more
sourceimpl ToCss for Transform
impl ToCss for Transform
sourcefn to_css<W>(&self, dest: &mut Printer<'_, W>) -> Result<(), PrinterError> where
W: Write,
fn to_css<W>(&self, dest: &mut Printer<'_, W>) -> Result<(), PrinterError> where
W: Write,
Serialize self
in CSS syntax, writing to dest
.
sourcefn to_css_string(
&self,
options: PrinterOptions<'_>
) -> Result<String, PrinterError>
fn to_css_string(
&self,
options: PrinterOptions<'_>
) -> Result<String, PrinterError>
Serialize self
in CSS syntax and return a string. Read more
impl StructuralPartialEq 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
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more