Struct usvg::AspectRatio [−][src]
Expand description
Representation of the preserveAspectRatio
attribute.
Examples
use std::str::FromStr; use svgtypes::AspectRatio; let ratio = AspectRatio::from_str("xMinYMax slice").unwrap(); assert_eq!(ratio.to_string(), "xMinYMax slice");
Fields
defer: bool
<defer>
value.
Set to true
when defer
value is present.
align: Align
<align>
value.
slice: bool
<meetOrSlice>
value.
- Set to
true
whenslice
value is present. - Set to
false
whenmeet
value is present or value is not set at all.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
impl RefUnwindSafe for AspectRatio
impl Send for AspectRatio
impl Sync for AspectRatio
impl Unpin for AspectRatio
impl UnwindSafe for AspectRatio
Blanket Implementations
Mutably borrows from an owned value. Read more
Checks that type has a default value.