[][src]Module rsvg_internals::aspect_ratio

Handling of preserveAspectRatio values.

This module handles preserveAspectRatio values per the SVG specification. We have an AspectRatio struct which encapsulates such a value.

This example is not tested
assert_eq!(
    AspectRatio::parse("xMidYMid", ()),
    Ok(AspectRatio {
        defer: false,
        align: Some(Align {
            x: X(Align1D::Mid),
            y: Y(Align1D::Mid),
            fit: FitMode::Meet,
        }),
    })
);

Structs

Align
AspectRatio
X
Y

Enums

Align1D
FitMode

Functions

parse_align_xy
parse_fit_mode