[go: up one dir, main page]

[][src]Struct colorous::Gradient

pub struct Gradient { /* fields omitted */ }

Methods

impl Gradient[src]

pub fn eval_rational(&self, i: usize, n: usize) -> Color[src]

Samples the gradient at position i/n. Requires 0 ≤ i < n.

pub fn eval_continuous(&self, t: f64) -> Color[src]

Samples the gradient at position t. Requires 0.0 ≤ t ≤ 1.0.

Trait Implementations

impl Clone for Gradient[src]

impl Copy for Gradient[src]

impl Debug for Gradient[src]

Auto Trait Implementations

impl !RefUnwindSafe for Gradient

impl !Send for Gradient

impl !Sync for Gradient

impl Unpin for Gradient

impl !UnwindSafe for Gradient

Blanket Implementations

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

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

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

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.