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
Gradient that transitions between two or more colors that radiate from an origin.
Fields
Sweep
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<'de> Deserialize<'de> for GradientKind
impl<'de> Deserialize<'de> for GradientKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for GradientKind
impl PartialEq for GradientKind
source§impl Serialize for GradientKind
impl Serialize for GradientKind
impl Copy for GradientKind
impl StructuralPartialEq for GradientKind
Auto Trait Implementations§
impl Freeze for GradientKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)