[−][src]Enum cichlid::color_util::GradientDirection
Possible Directions around the color wheel a gradient can go.
Variants
Forward
Goes around the color wheel clockwise. ala, Hue increases as the gradient progresses, including integer wrapping.
Backwards
Goes around the color wheel counter-clockwise. Hue decreases as the gradient progresses, including integer wrapping.
Shortest
Goes around the color wheel by the shortest direction available.
Longest
Goes around the color wheel by longest direction available.
Methods
impl GradientDirection
[src]
pub fn into_hue_direction(self, hue_diff: u8) -> HueDirection
[src]
Transforms a GradientDirection
into a HueDirection
.
hue_diff
is the difference between the ending hue and the starting hue. Specifically,
hue_diff = end_hue.wrapping_sub(start_hue)
. This is needed in the cases where the
discriminant is neither forwards or backwards.
Trait Implementations
impl Eq for GradientDirection
[src]
impl Copy for GradientDirection
[src]
impl PartialEq<GradientDirection> for GradientDirection
[src]
fn eq(&self, other: &GradientDirection) -> bool
[src]
#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for GradientDirection
[src]
fn clone(&self) -> GradientDirection
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<HueDirection> for GradientDirection
[src]
fn from(dir: HueDirection) -> GradientDirection
[src]
impl Debug for GradientDirection
[src]
Auto Trait Implementations
impl Send for GradientDirection
impl Sync for GradientDirection
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,