Struct palette::gradient::Slice[][src]

pub struct Slice<'a, C: Mix + Clone + 'a> { /* fields omitted */ }

A slice of a Gradient that limits its domain.

Methods

impl<'a, C: Mix + Clone> Slice<'a, C>
[src]

Get a color from the gradient slice. The color of the closest domain limit will be returned if i is outside the domain.

Important traits for Take<'a, C>

Take n evenly spaced colors from the gradient slice, as an iterator.

Slice this gradient slice to further limit its domain. Ranges outside the domain will be clamped to the nearest domain limit.

Get the limits of this gradient slice's domain.

Trait Implementations

impl<'a, C: Clone + Mix + Clone + 'a> Clone for Slice<'a, C> where
    C::Scalar: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, C: Debug + Mix + Clone + 'a> Debug for Slice<'a, C> where
    C::Scalar: Debug
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, C> Send for Slice<'a, C> where
    C: Sync,
    <C as Mix>::Scalar: Send + Sync

impl<'a, C> Sync for Slice<'a, C> where
    C: Sync,
    <C as Mix>::Scalar: Sync