Struct surf_n_term::color::RGBA [−][src]
u8 RGBA color
Implementations
Trait Implementations
impl Color for RGBA
[src]
impl Color for RGBA
[src]fn rgba_u8(self) -> [u8; 4]
[src]
fn rgba_u8(self) -> [u8; 4]
[src]Convert color into 32-bit sRGB array with alpha (channels are not pre-multiplied).
fn rgb_u8(self) -> [u8; 3]
[src]
fn rgb_u8(self) -> [u8; 3]
[src]Convert color into 24-bit sRGB array without alpha (channels are not pre-multiplied).
fn blend(self, other: impl Color, method: Blend) -> Self
[src]
fn blend(self, other: impl Color, method: Blend) -> Self
[src]Blend current color with the other color, with the specified blend method.
fn lerp(self, other: impl Color, t: f64) -> Self
[src]
fn lerp(self, other: impl Color, t: f64) -> Self
[src]Linear interpolation between self and other colors.
fn best_contrast(self, c0: impl Color, c1: impl Color) -> Self
[src]
fn best_contrast(self, c0: impl Color, c1: impl Color) -> Self
[src]Pick color that produces the best contrast with self
impl Extend<RGBA> for OcTree
[src]
impl Extend<RGBA> for OcTree
[src]fn extend<T: IntoIterator<Item = RGBA>>(&mut self, colors: T)
[src]
fn extend<T: IntoIterator<Item = RGBA>>(&mut self, colors: T)
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl From<ColorLinear> for RGBA
[src]
impl From<ColorLinear> for RGBA
[src]fn from(color: ColorLinear) -> Self
[src]
fn from(color: ColorLinear) -> Self
[src]Performs the conversion.
impl FromIterator<RGBA> for OcTree
[src]
impl FromIterator<RGBA> for OcTree
[src]fn from_iter<T: IntoIterator<Item = RGBA>>(iter: T) -> Self
[src]
fn from_iter<T: IntoIterator<Item = RGBA>>(iter: T) -> Self
[src]Creates a value from an iterator. Read more
impl Ord for RGBA
[src]
impl Ord for RGBA
[src]impl PartialOrd<RGBA> for RGBA
[src]
impl PartialOrd<RGBA> for RGBA
[src]fn partial_cmp(&self, other: &RGBA) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RGBA) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for RGBA
[src]
impl Eq for RGBA
[src]
impl StructuralEq for RGBA
[src]
impl StructuralPartialEq for RGBA
[src]
Auto Trait Implementations
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more