Enum peniko::GradientKind
source · pub enum GradientKind {
Linear {
start: Point,
end: Point,
},
Radial {
start_center: Point,
start_radius: f32,
end_center: Point,
end_radius: f32,
},
Sweep {
center: Point,
start_angle: f32,
end_angle: f32,
},
}
Expand description
Properties for the supported gradient types.
Variants§
Linear
Gradient that transitions between two or more colors along a line.
Radial
Fields
Gradient that transitions between two or more colors that radiate from an origin.
Sweep
Fields
Gradient that transitions between two or more colors that rotate around a center point.
Trait Implementations§
source§impl Clone for GradientKind
impl Clone for GradientKind
source§fn clone(&self) -> GradientKind
fn clone(&self) -> GradientKind
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 GradientKind
impl Debug for GradientKind
source§impl PartialEq for GradientKind
impl PartialEq for GradientKind
source§fn eq(&self, other: &GradientKind) -> bool
fn eq(&self, other: &GradientKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for GradientKind
impl StructuralPartialEq for GradientKind
Auto Trait Implementations§
impl RefUnwindSafe for GradientKind
impl Send for GradientKind
impl Sync for GradientKind
impl Unpin for GradientKind
impl UnwindSafe for GradientKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more