Struct style::values::generics::image::Gradient
[−]
[src]
pub struct Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> { pub kind: GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>, pub items: Vec<GradientItem<Color, LengthOrPercentage>>, pub repeating: bool, pub compat_mode: CompatMode, }
A CSS gradient. https://drafts.csswg.org/css-images/#gradients
Fields
kind: GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>
Gradients can be linear or radial.
items: Vec<GradientItem<Color, LengthOrPercentage>>
The color stops and interpolation hints.
repeating: bool
True if this is a repeating gradient.
compat_mode: CompatMode
Compatibility mode.
Trait Implementations
impl<LineDirection: Clone, Length: Clone, LengthOrPercentage: Clone, Position: Clone, Color: Clone, Angle: Clone> Clone for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]
fn clone(
&self
) -> Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]
&self
) -> Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
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<LineDirection: Debug, Length: Debug, LengthOrPercentage: Debug, Position: Debug, Color: Debug, Angle: Debug> Debug for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> MallocSizeOf for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> where
LineDirection: MallocSizeOf,
Length: MallocSizeOf,
LengthOrPercentage: MallocSizeOf,
Position: MallocSizeOf,
Color: MallocSizeOf,
Angle: MallocSizeOf,
[src]
LineDirection: MallocSizeOf,
Length: MallocSizeOf,
LengthOrPercentage: MallocSizeOf,
Position: MallocSizeOf,
Color: MallocSizeOf,
Angle: MallocSizeOf,
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<LineDirection: PartialEq, Length: PartialEq, LengthOrPercentage: PartialEq, Position: PartialEq, Color: PartialEq, Angle: PartialEq> PartialEq for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]
fn eq(
&self,
__arg_0: &Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
) -> bool
[src]
&self,
__arg_0: &Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(
&self,
__arg_0: &Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
) -> bool
[src]
&self,
__arg_0: &Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
) -> bool
This method tests for !=
.
impl<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> ToComputedValue for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> where
GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>: ToComputedValue<ComputedValue = GradientKind<<LineDirection as ToComputedValue>::ComputedValue, <Length as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue, <Position as ToComputedValue>::ComputedValue, <Angle as ToComputedValue>::ComputedValue>>,
LengthOrPercentage: ToComputedValue,
LineDirection: ToComputedValue,
Angle: ToComputedValue,
Position: ToComputedValue,
Length: ToComputedValue,
Vec<GradientItem<Color, LengthOrPercentage>>: ToComputedValue<ComputedValue = Vec<GradientItem<<Color as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue>>>,
Color: ToComputedValue,
[src]
GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>: ToComputedValue<ComputedValue = GradientKind<<LineDirection as ToComputedValue>::ComputedValue, <Length as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue, <Position as ToComputedValue>::ComputedValue, <Angle as ToComputedValue>::ComputedValue>>,
LengthOrPercentage: ToComputedValue,
LineDirection: ToComputedValue,
Angle: ToComputedValue,
Position: ToComputedValue,
Length: ToComputedValue,
Vec<GradientItem<Color, LengthOrPercentage>>: ToComputedValue<ComputedValue = Vec<GradientItem<<Color as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue>>>,
Color: ToComputedValue,
type ComputedValue = Gradient<<LineDirection as ToComputedValue>::ComputedValue, <Length as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue, <Position as ToComputedValue>::ComputedValue, <Color as ToComputedValue>::ComputedValue, <Angle as ToComputedValue>::ComputedValue>
The computed value type we're going to be converted to.
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue
[src]
Convert a specified value to a computed value, using itself and the data inside the Context
. Read more
fn from_computed_value(computed: &Self::ComputedValue) -> Self
[src]
Convert a computed value to specified value form. Read more
impl<D, L, LoP, P, C, A> ToCss for Gradient<D, L, LoP, P, C, A> where
D: LineDirection,
L: ToCss,
LoP: ToCss,
P: ToCss,
C: ToCss,
A: ToCss,
[src]
D: LineDirection,
L: ToCss,
LoP: ToCss,
P: ToCss,
C: ToCss,
A: ToCss,