pub struct TransformEffect {
pub scale_x: Option<Percentage>,
pub scale_y: Option<Percentage>,
pub translate_x: Option<Coordinate>,
pub translate_y: Option<Coordinate>,
pub skew_x: Option<FixedAngle>,
pub skew_y: Option<FixedAngle>,
}
Expand description
This element specifies a transform effect. The transform is applied to each point in the shape’s geometry using the following matrix:
sx tan(kx) tx x tan(ky) sy ty * y 0 0 1 1
Fields§
§scale_x: Option<Percentage>
Specifies a percentage by which to horizontally scale the object.
Defaults to 100_000
scale_y: Option<Percentage>
Specifies a percentage by which to vertically scale the object.
Defaults to 100_000
translate_x: Option<Coordinate>
Specifies an amount by which to shift the object along the x-axis.
Defaults to 0
translate_y: Option<Coordinate>
Specifies an amount by which to shift the object along the y-axis.
Defaults to 0
skew_x: Option<FixedAngle>
Specifies the horizontal skew angle, defined as the angle between the top-left corner and bottom-left corner of the object’s original bounding box. If positive, the bottom edge of the shape is positioned to the right relative to the top edge.
Defaults to 0
skew_y: Option<FixedAngle>
Specifies the vertical skew angle, defined as the angle between the top-left corner and top-right corner of the object’s original bounding box. If positive, the right edge of the object is positioned lower relative to the left edge.
Defaults to 0
Implementations§
Source§impl TransformEffect
impl TransformEffect
pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self>
Trait Implementations§
Source§impl Clone for TransformEffect
impl Clone for TransformEffect
Source§fn clone(&self) -> TransformEffect
fn clone(&self) -> TransformEffect
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more