pub struct CT_Transform2D {
pub offset: Option<CT_Point2D>,
pub extent: Option<CT_PositiveSize2D>,
pub child_offset: Option<CT_Point2D>,
pub child_extent: Option<CT_PositiveSize2D>,
pub rotation: Angle,
pub flip_horizontal: bool,
pub flip_vertical: bool,
/* private fields */
}Expand description
The offset, extent, rotation, and flips carried by a:xfrm.
Fields§
§offset: Option<CT_Point2D>§extent: Option<CT_PositiveSize2D>§child_offset: Option<CT_Point2D>§child_extent: Option<CT_PositiveSize2D>§rotation: Angle§flip_horizontal: bool§flip_vertical: boolImplementations§
Source§impl CT_Transform2D
impl CT_Transform2D
Sourcepub fn from_xml(xml: &[u8]) -> Result<Self>
pub fn from_xml(xml: &[u8]) -> Result<Self>
Parses one complete a:xfrm element with any namespace prefix.
Sourcepub fn from_element(
reader: &mut Reader<&[u8]>,
start: &BytesStart<'_>,
) -> Result<Self>
pub fn from_element( reader: &mut Reader<&[u8]>, start: &BytesStart<'_>, ) -> Result<Self>
Parses an a:xfrm after the caller has consumed its start event.
Sourcepub fn from_empty_element(start: &BytesStart<'_>) -> Result<Self>
pub fn from_empty_element(start: &BytesStart<'_>) -> Result<Self>
Parses a self-closing a:xfrm element.
Sourcepub fn to_xml(&self) -> Result<Vec<u8>>
pub fn to_xml(&self) -> Result<Vec<u8>>
Writes this transform with the canonical a: prefix and schema order.
Sourcepub fn write_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
pub fn write_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
Writes this transform into an existing XML writer.
Sourcepub fn write_xml_with_root<W: Write>(
&self,
writer: &mut Writer<W>,
root_name: &str,
) -> Result<()>
pub fn write_xml_with_root<W: Write>( &self, writer: &mut Writer<W>, root_name: &str, ) -> Result<()>
Writes this transform with the requested qualified root name.
DrawingML owns the transform type, while host formats own the element
that carries it. PresentationML graphic frames therefore use
p:xfrm, while DrawingML shapes use a:xfrm.
Sourcepub fn matrix(&self) -> Result<[f64; 6]>
pub fn matrix(&self) -> Result<[f64; 6]>
Returns the affine coefficients in PDF matrix order a, b, c, d, e, f.
Sourcepub fn raw_children(&self) -> &OrderedRawChildren
pub fn raw_children(&self) -> &OrderedRawChildren
Returns raw, not-yet-modelled children grouped by schema boundary.
Trait Implementations§
Source§impl Clone for CT_Transform2D
impl Clone for CT_Transform2D
Source§fn clone(&self) -> CT_Transform2D
fn clone(&self) -> CT_Transform2D
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CT_Transform2D
impl Debug for CT_Transform2D
Source§impl Default for CT_Transform2D
impl Default for CT_Transform2D
Source§fn default() -> CT_Transform2D
fn default() -> CT_Transform2D
Returns the “default value” for a type. Read more
impl Eq for CT_Transform2D
Source§impl PartialEq for CT_Transform2D
impl PartialEq for CT_Transform2D
impl StructuralPartialEq for CT_Transform2D
Auto Trait Implementations§
impl Freeze for CT_Transform2D
impl RefUnwindSafe for CT_Transform2D
impl Send for CT_Transform2D
impl Sync for CT_Transform2D
impl Unpin for CT_Transform2D
impl UnsafeUnpin for CT_Transform2D
impl UnwindSafe for CT_Transform2D
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