Struct piet_common::FixedLinearGradient
source · 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: PointThe start point (corresponding to pos 0.0).
end: PointThe 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
sourceimpl Clone for FixedLinearGradient
impl Clone for FixedLinearGradient
sourcefn clone(&self) -> FixedLinearGradient
fn clone(&self) -> FixedLinearGradient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for FixedLinearGradient
impl Debug for FixedLinearGradient
sourceimpl From<FixedLinearGradient> for FixedGradient
impl From<FixedLinearGradient> for FixedGradient
sourcefn from(src: FixedLinearGradient) -> FixedGradient
fn from(src: FixedLinearGradient) -> FixedGradient
Converts to this type from the input type.
sourceimpl From<FixedLinearGradient> for PaintBrush
impl From<FixedLinearGradient> for PaintBrush
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.