[][src]Enum cichlid::color_util::GradientDirection

#[repr(u8)]
pub enum GradientDirection { Forward, Backwards, Shortest, Longest, }

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]

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for 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]

impl Debug for GradientDirection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.