[][src]Enum cichlid::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 Clone for GradientDirection[src]

impl Copy for GradientDirection[src]

impl Eq for GradientDirection[src]

impl PartialEq<GradientDirection> for GradientDirection[src]

impl Debug for GradientDirection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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