pub struct NormalizeParams {
vbox: ViewBox,
font_size: f64,
dpi: Dpi,
is_vertical_text: bool,
}Expand description
Parameters to normalize Length values to user-space distances.
Fields§
§vbox: ViewBox§font_size: f64§dpi: Dpi§is_vertical_text: boolImplementations§
Source§impl NormalizeParams
impl NormalizeParams
Sourcepub fn new(values: &ComputedValues, viewport: &Viewport) -> NormalizeParams
pub fn new(values: &ComputedValues, viewport: &Viewport) -> NormalizeParams
Extracts the information needed to normalize Length values from a set of
ComputedValues and the viewport size in Viewport.
pub fn from_values(v: &NormalizeValues, viewport: &Viewport) -> NormalizeParams
Sourcepub fn from_dpi(dpi: Dpi) -> NormalizeParams
pub fn from_dpi(dpi: Dpi) -> NormalizeParams
Just used by rsvg-convert, where there is no font size nor viewport.
Auto Trait Implementations§
impl Freeze for NormalizeParams
impl RefUnwindSafe for NormalizeParams
impl Send for NormalizeParams
impl Sync for NormalizeParams
impl Unpin for NormalizeParams
impl UnwindSafe for NormalizeParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.