Struct piet::FixedLinearGradient
source · pub struct FixedLinearGradient {
pub start: Point,
pub end: Point,
pub stops: Vec<GradientStop>,
}
Expand description
Specification of a linear gradient.
This specification is in terms of image-space coordinates. In many
cases, it is better to specify coordinates relative to the Rect
of the item being drawn; for these, use LinearGradient
instead.
Fields§
§start: Point
The start point (corresponding to pos 0.0).
end: Point
The end point (corresponding to pos 1.0).
stops: Vec<GradientStop>
The stops.
There must be at least two for the gradient to be valid.
Trait Implementations§
source§impl Clone for FixedLinearGradient
impl Clone for FixedLinearGradient
source§fn clone(&self) -> FixedLinearGradient
fn clone(&self) -> FixedLinearGradient
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 Debug for FixedLinearGradient
impl Debug for FixedLinearGradient
source§impl From<FixedLinearGradient> for FixedGradient
impl From<FixedLinearGradient> for FixedGradient
source§fn from(src: FixedLinearGradient) -> FixedGradient
fn from(src: FixedLinearGradient) -> FixedGradient
Converts to this type from the input type.
source§impl From<FixedLinearGradient> for PaintBrush
impl From<FixedLinearGradient> for PaintBrush
source§fn from(src: FixedLinearGradient) -> PaintBrush
fn from(src: FixedLinearGradient) -> PaintBrush
Converts to this type from the input type.