Struct usvg::AspectRatio[][src]

pub struct AspectRatio {
    pub defer: bool,
    pub align: Align,
    pub slice: bool,
}

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> value.

Set to true when defer value is present.

<align> value.

<meetOrSlice> value.

  • Set to true when slice value is present.
  • Set to false when meet value is present or value is not set at all.

Trait Implementations

impl From<AspectRatio> for AttributeValue
[src]

Performs the conversion.

impl WriteBuffer for AspectRatio
[src]

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.

impl FromSpan for AspectRatio
[src]

Parses data from a StrSpan.

impl Display for AspectRatio
[src]

Formats the value using the given formatter. Read more

impl Clone for AspectRatio
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for AspectRatio
[src]

Returns the "default value" for a type. Read more

impl FromStr for AspectRatio
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Debug for AspectRatio
[src]

Formats the value using the given formatter. Read more

impl Copy for AspectRatio
[src]

impl PartialEq<AspectRatio> for AspectRatio
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for AspectRatio

impl Sync for AspectRatio