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]

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter.