Struct style::values::computed::length::CSSPixelLength
[−]
[src]
pub struct CSSPixelLength(_);
The computed <length>
value.
Methods
impl CSSPixelLength
[src]
pub fn new(px: CSSFloat) -> Self
[src]
Return a new CSSPixelLength.
pub fn px(&self) -> CSSFloat
[src]
Return the containing pixel value.
pub fn to_i32_au(&self) -> i32
[src]
Return the length with app_unit i32 type.
pub fn abs(self) -> Self
[src]
Return the absolute value of this length.
pub fn zero() -> Self
[src]
Zero value
Trait Implementations
impl Animate for CSSPixelLength
[src]
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
[src]
Animate a value towards another one, given an animation procedure.
impl Clone for CSSPixelLength
[src]
fn clone(&self) -> CSSPixelLength
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl ComputeSquaredDistance for CSSPixelLength
[src]
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
[src]
Computes the squared distance between two animatable values.
impl Copy for CSSPixelLength
[src]
impl Debug for CSSPixelLength
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for CSSPixelLength
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl PartialEq for CSSPixelLength
[src]
fn eq(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests for !=
.
impl PartialOrd for CSSPixelLength
[src]
fn partial_cmp(&self, __arg_0: &CSSPixelLength) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &CSSPixelLength) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl ToAnimatedValue for CSSPixelLength
[src]
type AnimatedValue = CSSPixelLength
The type of the animated value.
fn to_animated_value(self) -> Self::AnimatedValue
[src]
Converts this value to an animated value.
fn from_animated_value(animated: Self::AnimatedValue) -> Self
[src]
Converts back an animated value into a computed value.
impl ToAnimatedZero for CSSPixelLength
[src]
fn to_animated_zero(&self) -> Result<Self, ()>
[src]
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
impl ToCss for CSSPixelLength
[src]
fn to_css<W>(&self, dest: &mut W) -> Result where
W: Write,
[src]
W: Write,
Serialize self
in CSS syntax, writing to dest
.
fn to_css_string(&self) -> String
[src]
Serialize self
in CSS syntax and return a string. Read more
impl Neg for CSSPixelLength
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self
[src]
Performs the unary -
operation.
impl From<CSSPixelLength> for Au
[src]
fn from(len: CSSPixelLength) -> Self
[src]
Performs the conversion.