<commit_before>//! Handling of `preserveAspectRatio` values.
//!
//! This module handles `preserveAspectRatio` values [per the SVG specification][spec].
//! We have an [`AspectRatio`] struct which encapsulates such a value.
//!
//! ```
//! # use librsvg::doctest_only::AspectRatio;
//! # use librsvg::doctest_only::Parse;
//! assert_eq!(
//!     AspectRatio::parse_str("xMidYMid").unwrap(),
//!     AspectRatio::default()
//! );
//! ```
//!
//! [`AspectRatio`]: struct.AspectRatio.html
//! [spec]: https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute

use cssparser::{BasicParseError, Parser};
use std::fmt;
use std::ops::Deref;

use crate::error::*;
use crate::parsers::Parse;
use crate::rect::Rect;
use crate::transform::Transform;
use crate::viewbox::ViewBox;

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
enum FitMode {
    Meet,<commit_msg>aspect_ratio.rs: links to doc items by name<commit_after>//! Handling of `preserveAspectRatio` values.
//!
//! This module handles `preserveAspectRatio` values [per the SVG specification][spec].
//! We have an [`AspectRatio`] struct which encapsulates such a value.
//!
//! ```
//! # use librsvg::doctest_only::AspectRatio;
//! # use librsvg::doctest_only::Parse;
//! assert_eq!(
//!     AspectRatio::parse_str("xMidYMid").unwrap(),
//!     AspectRatio::default()
//! );
//! ```
//!
//! [spec]: https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute

use cssparser::{BasicParseError, Parser};
use std::fmt;
use std::ops::Deref;

use crate::error::*;
use crate::parsers::Parse;
use crate::rect::Rect;
use crate::transform::Transform;
use crate::viewbox::ViewBox;

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
enum FitMode {
    Meet,
{'fraction_non_alphanumeric': 0.1984732824427481, 'fraction_numerical': 0.0011743981209630064, 'mean_word_length': 5.021201413427562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4077437', 'n_tokens_mistral': 613, 'n_tokens_neox': 573, 'n_words': 123}