Struct style::values::animated::color::RGBA
[−]
[src]
pub struct RGBA { pub red: f32, pub green: f32, pub blue: f32, pub alpha: f32, }
An animated RGBA color.
Unlike in computed values, each component value may exceed the
range [0.0, 1.0]
.
Fields
red: f32
The red component.
green: f32
The green component.
blue: f32
The blue component.
alpha: f32
The alpha component.
Methods
impl RGBA
[src]
pub fn transparent() -> Self
[src]
Returns a transparent color.
pub fn new(red: f32, green: f32, blue: f32, alpha: f32) -> Self
[src]
Returns a new color.
Trait Implementations
impl MallocSizeOf for RGBA
[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 Clone for RGBA
[src]
fn clone(&self) -> RGBA
[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 Copy for RGBA
[src]
impl Debug for RGBA
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for RGBA
[src]
fn eq(&self, __arg_0: &RGBA) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RGBA) -> bool
[src]
This method tests for !=
.
impl ToAnimatedZero for RGBA
[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 Animate for RGBA
[src]
Unlike Animate for computed colors, we don't clamp any component values.
FIXME(nox): Why do computed colors even implement Animate?
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
[src]
Animate a value towards another one, given an animation procedure.
impl ComputeSquaredDistance for RGBA
[src]
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
[src]
Computes the squared distance between two animatable values.