pub(crate) type AspectRatio = GenericAspectRatio<NonNegative<f32>>;
Expand description
A computed value for the aspect-ratio
property.
Aliased Type§
struct AspectRatio {
pub auto: bool,
pub ratio: PreferredRatio<NonNegative<f32>>,
}
Fields§
§auto: bool
Specifiy auto or not.
ratio: PreferredRatio<NonNegative<f32>>
The preferred aspect-ratio value.
Implementations
Source§impl<N> GenericAspectRatio<N>
impl<N> GenericAspectRatio<N>
Sourcepub fn auto() -> GenericAspectRatio<N>
pub fn auto() -> GenericAspectRatio<N>
Returns auto
Trait Implementations
Source§impl<N> Animate for GenericAspectRatio<N>
impl<N> Animate for GenericAspectRatio<N>
Source§fn animate(
&self,
other: &GenericAspectRatio<N>,
procedure: Procedure,
) -> Result<GenericAspectRatio<N>, ()>
fn animate( &self, other: &GenericAspectRatio<N>, procedure: Procedure, ) -> Result<GenericAspectRatio<N>, ()>
Animate a value towards another one, given an animation procedure.
Source§impl<N> Clone for GenericAspectRatio<N>where
N: Clone,
impl<N> Clone for GenericAspectRatio<N>where
N: Clone,
Source§fn clone(&self) -> GenericAspectRatio<N>
fn clone(&self) -> GenericAspectRatio<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N> ComputeSquaredDistance for GenericAspectRatio<N>
impl<N> ComputeSquaredDistance for GenericAspectRatio<N>
Source§fn compute_squared_distance(
&self,
other: &GenericAspectRatio<N>,
) -> Result<SquaredDistance, ()>
fn compute_squared_distance( &self, other: &GenericAspectRatio<N>, ) -> Result<SquaredDistance, ()>
Computes the squared distance between two animatable values.
Source§impl<N> Debug for GenericAspectRatio<N>where
N: Debug,
impl<N> Debug for GenericAspectRatio<N>where
N: Debug,
Source§impl<N> MallocSizeOf for GenericAspectRatio<N>where
N: MallocSizeOf,
impl<N> MallocSizeOf for GenericAspectRatio<N>where
N: MallocSizeOf,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<N> PartialEq for GenericAspectRatio<N>where
N: PartialEq,
impl<N> PartialEq for GenericAspectRatio<N>where
N: PartialEq,
Source§impl<N> SpecifiedValueInfo for GenericAspectRatio<N>where
N: SpecifiedValueInfo,
impl<N> SpecifiedValueInfo for GenericAspectRatio<N>where
N: SpecifiedValueInfo,
Source§const SUPPORTED_TYPES: u8
const SUPPORTED_TYPES: u8
Supported CssTypes by the given value type. Read more
Source§impl<N> ToAnimatedValue for GenericAspectRatio<N>where
N: ToAnimatedValue,
impl<N> ToAnimatedValue for GenericAspectRatio<N>where
N: ToAnimatedValue,
Source§type AnimatedValue = GenericAspectRatio<<N as ToAnimatedValue>::AnimatedValue>
type AnimatedValue = GenericAspectRatio<<N as ToAnimatedValue>::AnimatedValue>
The type of the animated value.
Source§fn from_animated_value(
from: <GenericAspectRatio<N> as ToAnimatedValue>::AnimatedValue,
) -> GenericAspectRatio<N>
fn from_animated_value( from: <GenericAspectRatio<N> as ToAnimatedValue>::AnimatedValue, ) -> GenericAspectRatio<N>
Converts back an animated value into a computed value.
Source§fn to_animated_value(
self,
context: &Context<'_>,
) -> <GenericAspectRatio<N> as ToAnimatedValue>::AnimatedValue
fn to_animated_value( self, context: &Context<'_>, ) -> <GenericAspectRatio<N> as ToAnimatedValue>::AnimatedValue
Converts this value to an animated value.
Source§impl<N> ToAnimatedZero for GenericAspectRatio<N>
impl<N> ToAnimatedZero for GenericAspectRatio<N>
Source§fn to_animated_zero(&self) -> Result<GenericAspectRatio<N>, ()>
fn to_animated_zero(&self) -> Result<GenericAspectRatio<N>, ()>
Returns a value that, when added with an underlying value, will produce the underlying
value. This is used for SMIL animation’s “by-animation” where SMIL first interpolates from
the zero value to the ‘by’ value, and then adds the result to the underlying value. Read more
Source§impl<N> ToComputedValue for GenericAspectRatio<N>where
N: ToComputedValue,
impl<N> ToComputedValue for GenericAspectRatio<N>where
N: ToComputedValue,
Source§type ComputedValue = GenericAspectRatio<<N as ToComputedValue>::ComputedValue>
type ComputedValue = GenericAspectRatio<<N as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
Source§fn from_computed_value(
from: &<GenericAspectRatio<N> as ToComputedValue>::ComputedValue,
) -> GenericAspectRatio<N>
fn from_computed_value( from: &<GenericAspectRatio<N> as ToComputedValue>::ComputedValue, ) -> GenericAspectRatio<N>
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(
&self,
context: &Context<'_>,
) -> <GenericAspectRatio<N> as ToComputedValue>::ComputedValue
fn to_computed_value( &self, context: &Context<'_>, ) -> <GenericAspectRatio<N> as ToComputedValue>::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.Source§impl<N> ToCss for GenericAspectRatio<N>
impl<N> ToCss for GenericAspectRatio<N>
Source§impl<N> ToResolvedValue for GenericAspectRatio<N>where
N: ToResolvedValue,
impl<N> ToResolvedValue for GenericAspectRatio<N>where
N: ToResolvedValue,
Source§type ResolvedValue = GenericAspectRatio<<N as ToResolvedValue>::ResolvedValue>
type ResolvedValue = GenericAspectRatio<<N as ToResolvedValue>::ResolvedValue>
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(
from: <GenericAspectRatio<N> as ToResolvedValue>::ResolvedValue,
) -> GenericAspectRatio<N>
fn from_resolved_value( from: <GenericAspectRatio<N> as ToResolvedValue>::ResolvedValue, ) -> GenericAspectRatio<N>
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(
self,
context: &Context<'_>,
) -> <GenericAspectRatio<N> as ToResolvedValue>::ResolvedValue
fn to_resolved_value( self, context: &Context<'_>, ) -> <GenericAspectRatio<N> as ToResolvedValue>::ResolvedValue
Convert a resolved value to a resolved value.
Source§impl<N> ToShmem for GenericAspectRatio<N>where
N: ToShmem,
impl<N> ToShmem for GenericAspectRatio<N>where
N: ToShmem,
Source§fn to_shmem(
&self,
builder: &mut SharedMemoryBuilder,
) -> Result<ManuallyDrop<GenericAspectRatio<N>>, String>
fn to_shmem( &self, builder: &mut SharedMemoryBuilder, ) -> Result<ManuallyDrop<GenericAspectRatio<N>>, String>
Clones this value into a form suitable for writing into a
SharedMemoryBuilder. Read more