Struct epaint::color::Rgba[][src]

pub struct Rgba(_);

0-1 linear space RGBA color with premultiplied alpha.

Implementations

impl Rgba[src]

pub const TRANSPARENT: Rgba[src]

pub const BLACK: Rgba[src]

pub const WHITE: Rgba[src]

pub const RED: Rgba[src]

pub const GREEN: Rgba[src]

pub const BLUE: Rgba[src]

pub const fn from_rgba_premultiplied(r: f32, g: f32, b: f32, a: f32) -> Self[src]

pub const fn from_rgb(r: f32, g: f32, b: f32) -> Self[src]

pub const fn from_gray(l: f32) -> Self[src]

pub fn from_luminance_alpha(l: f32, a: f32) -> Self[src]

pub fn from_black_alpha(a: f32) -> Self[src]

Transparent black

pub fn from_white_alpha(a: f32) -> Self[src]

Transparent white

pub fn additive(self) -> Self[src]

Return an additive version of this color (alpha = 0)

pub fn multiply(self, alpha: f32) -> Self[src]

Multiply with e.g. 0.5 to make us half transparent

pub fn r(&self) -> f32[src]

pub fn g(&self) -> f32[src]

pub fn b(&self) -> f32[src]

pub fn a(&self) -> f32[src]

pub fn intensity(&self) -> f32[src]

How perceptually intense (bright) is the color?

pub fn to_opaque(&self) -> Self[src]

Returns an opaque version of self

Trait Implementations

impl Add<Rgba> for Rgba[src]

type Output = Rgba

The resulting type after applying the + operator.

fn add(self, rhs: Rgba) -> Rgba[src]

Performs the + operation. Read more

impl Clone for Rgba[src]

fn clone(&self) -> Rgba[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Rgba[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Rgba[src]

fn default() -> Rgba[src]

Returns the “default value” for a type. Read more

impl From<Color32> for Rgba[src]

fn from(srgba: Color32) -> Rgba[src]

Performs the conversion.

impl From<Hsva> for Rgba[src]

fn from(hsva: Hsva) -> Rgba[src]

Performs the conversion.

impl From<HsvaGamma> for Rgba[src]

fn from(hsvag: HsvaGamma) -> Rgba[src]

Performs the conversion.

impl From<Rgba> for Color32[src]

fn from(rgba: Rgba) -> Color32[src]

Performs the conversion.

impl From<Rgba> for Hsva[src]

fn from(rgba: Rgba) -> Hsva[src]

Performs the conversion.

impl From<Rgba> for HsvaGamma[src]

fn from(rgba: Rgba) -> HsvaGamma[src]

Performs the conversion.

impl Index<usize> for Rgba[src]

type Output = f32

The returned type after indexing.

fn index(&self, index: usize) -> &f32[src]

Performs the indexing (container[index]) operation. Read more

impl IndexMut<usize> for Rgba[src]

fn index_mut(&mut self, index: usize) -> &mut f32[src]

Performs the mutable indexing (container[index]) operation. Read more

impl Mul<Rgba> for Rgba[src]

type Output = Rgba

The resulting type after applying the * operator.

fn mul(self, other: Rgba) -> Rgba[src]

Performs the * operation. Read more

impl Mul<f32> for Rgba[src]

type Output = Rgba

The resulting type after applying the * operator.

fn mul(self, factor: f32) -> Rgba[src]

Performs the * operation. Read more

impl PartialEq<Rgba> for Rgba[src]

fn eq(&self, other: &Rgba) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rgba) -> bool[src]

This method tests for !=.

impl Copy 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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.