Enum flo_canvas::GradientOp
source · pub enum GradientOp {
Create(Color),
AddStop(f32, Color),
}
Expand description
Operations that can be applied to a gradient
Variants§
Create(Color)
Clears the gradient and starts a new one with the given initial colour
AddStop(f32, Color)
Adds a new gradient stop of the specified colour
Trait Implementations§
source§impl<'a> CanvasEncoding<String> for &'a GradientOp
impl<'a> CanvasEncoding<String> for &'a GradientOp
source§fn encode_canvas(&self, append_to: &mut String)
fn encode_canvas(&self, append_to: &mut String)
Encodes this item by appending it to the specified string
source§impl Clone for GradientOp
impl Clone for GradientOp
source§fn clone(&self) -> GradientOp
fn clone(&self) -> GradientOp
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 GradientOp
impl Debug for GradientOp
source§impl<'de> Deserialize<'de> for GradientOp
impl<'de> Deserialize<'de> for GradientOp
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<GradientOp> for GradientOp
impl PartialEq<GradientOp> for GradientOp
source§fn eq(&self, other: &GradientOp) -> bool
fn eq(&self, other: &GradientOp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.