Struct rin::color::Hsv[][src]

pub struct Hsv<T = f32, S = Srgb> {
    pub h: Deg<T>,
    pub s: T,
    pub v: T,
    pub standard: PhantomData<S>,
}

Fields

h: Deg<T>s: Tv: Tstandard: PhantomData<S>

Implementations

impl<T, S> Hsv<T, S>[src]

pub const fn new(h: Deg<T>, s: T, v: T) -> Hsv<T, S>[src]

Trait Implementations

impl<T, S> Clone for Hsv<T, S> where
    T: Clone
[src]

impl<T, S> Color<T> for Hsv<T, S> where
    T: Channel + NumCast + Num,
    S: TransferFunction
[src]

pub fn clamp_s(self, lo: T, hi: T) -> Hsv<T, S>[src]

Clamps the components of the color to the range (lo,hi).

pub fn clamp_c(self, lo: Hsv<T, S>, hi: Hsv<T, S>) -> Hsv<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

pub fn inverse(self) -> Hsv<T, S>[src]

Inverts the color.

impl<T, S> Debug for Hsv<T, S> where
    T: Debug,
    S: Debug
[src]

impl<'de, T, S> Deserialize<'de> for Hsv<T, S> where
    T: Deserialize<'de>, 
[src]

impl<T> FloatColor<T> for Hsv<T, Srgb> where
    T: FloatChannel
[src]

pub fn saturate(self) -> Hsv<T, Srgb>[src]

Normalizes the components of the color. Modulo 360 is applied to the h component, and s and v are clamped to the range (0,1).

impl<N, S> PartialEq<Hsv<N, S>> for Hsv<N, S> where
    N: Clone + PartialEq<N> + Num + NumCast
[src]

impl<T, S> Serialize for Hsv<T, S> where
    T: Serialize
[src]

impl<T, S> ToHsv for Hsv<T, S> where
    T: Channel + NumCast + Num,
    S: TransferFunction
[src]

type Standard = S

impl<T, S> ToRgb for Hsv<T, S> where
    T: Clone + Channel + NumCast + Num,
    S: TransferFunction
[src]

type Standard = S

impl<T, S> ToRgba for Hsv<T, S> where
    T: Clone + FloatChannel,
    S: TransferFunction
[src]

type Standard = S

impl<T, S> Copy for Hsv<T, S> where
    T: Copy
[src]

impl<N, S> Eq for Hsv<N, S> where
    N: Clone + PartialEq<N> + Eq + Num + NumCast
[src]

Auto Trait Implementations

impl<T, S> RefUnwindSafe for Hsv<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, S> Send for Hsv<T, S> where
    S: Send,
    T: Send

impl<T, S> Sync for Hsv<T, S> where
    S: Sync,
    T: Sync

impl<T, S> Unpin for Hsv<T, S> where
    S: Unpin,
    T: Unpin

impl<T, S> UnwindSafe for Hsv<T, S> where
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> IntoPnt<Point<T, U2>> for T where
    T: Scalar
[src]

impl<T> IntoPnt<Point<T, U3>> for T where
    T: Scalar
[src]

impl<T> IntoPnt<Point<T, U4>> for T where
    T: Scalar
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> JoinPnt<T, Point<T, U2>> for T where
    T: Scalar
[src]

type Output = Point<T, U3>

impl<T> JoinPnt<T, Point<T, U3>> for T where
    T: Scalar
[src]

type Output = Point<T, U4>

impl<T> JoinPnt<T, T> for T where
    T: Scalar
[src]

type Output = Point<T, U2>

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Debug + Any
[src]

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Slottable for T where
    T: Copy
[src]