pub type AspectRatio = AspectRatio<NonNegativeNumber>;Expand description
A specified value for the aspect-ratio property.
Aliased Type§
#[repr(C)]pub struct AspectRatio {
pub auto: bool,
pub ratio: PreferredRatio<NonNegative<Number>>,
}Fields§
§auto: boolSpecifiy auto or not.
ratio: PreferredRatio<NonNegative<Number>>The preferred aspect-ratio value.
Implementations§
Source§impl AspectRatio
impl AspectRatio
Sourcepub fn from_mapped_ratio(w: f32, h: f32) -> Self
pub fn from_mapped_ratio(w: f32, h: f32) -> Self
Returns Self by a valid ratio.
Trait Implementations§
Source§impl Parse for AspectRatio
impl Parse for AspectRatio
Source§fn parse(
context: &ParserContext<'_>,
input: &mut Parser<'_>,
) -> Result<Self, ParseError>
fn parse( context: &ParserContext<'_>, input: &mut Parser<'_>, ) -> Result<Self, ParseError>
Parse a value of this type. Read more