Trait rsvg::length::Normalize

source ·
pub trait Normalize {
    // Required method
    fn normalize(x: f64, y: f64) -> f64;
}
Expand description

Used for the N type parameter of CssLength<N: Normalize, V: Validate>.

Required Methods§

source

fn normalize(x: f64, y: f64) -> f64

Computes an orientation-based scaling factor.

This is used in the CssLength::to_user method to resolve lengths with percentage units; they need to be resolved with respect to the width, height, or normalized diagonal of the current viewport.

Object Safety§

This trait is not object safe.

Implementors§