Struct druid::piet::FixedLinearGradient
pub struct FixedLinearGradient {
pub start: Point,
pub end: Point,
pub stops: Vec<GradientStop, Global>,
}
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, Global>
The stops.
There must be at least two for the gradient to be valid.
Trait Implementations§
§impl Clone for FixedLinearGradient
impl Clone for FixedLinearGradient
§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 more§impl Debug for FixedLinearGradient
impl Debug for FixedLinearGradient
§impl From<FixedLinearGradient> for FixedGradient
impl From<FixedLinearGradient> for FixedGradient
§fn from(src: FixedLinearGradient) -> FixedGradient
fn from(src: FixedLinearGradient) -> FixedGradient
Converts to this type from the input type.
§impl From<FixedLinearGradient> for PaintBrush
impl From<FixedLinearGradient> for PaintBrush
§fn from(src: FixedLinearGradient) -> PaintBrush
fn from(src: FixedLinearGradient) -> PaintBrush
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for FixedLinearGradient
impl Send for FixedLinearGradient
impl Sync for FixedLinearGradient
impl Unpin for FixedLinearGradient
impl UnwindSafe for FixedLinearGradient
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.