Trait bevy_color::prelude::Alpha

source ·
pub trait Alpha: Sized {
    // Required methods
    fn with_alpha(&self, alpha: f32) -> Self;
    fn alpha(&self) -> f32;
    fn set_alpha(&mut self, alpha: f32);

    // Provided methods
    fn is_fully_transparent(&self) -> bool { ... }
    fn is_fully_opaque(&self) -> bool { ... }
}
Expand description

Methods for manipulating alpha values.

Required Methods§

source

fn with_alpha(&self, alpha: f32) -> Self

Return a new version of this color with the given alpha value.

source

fn alpha(&self) -> f32

Return a the alpha component of this color.

source

fn set_alpha(&mut self, alpha: f32)

Sets the alpha component of this color.

Provided Methods§

source

fn is_fully_transparent(&self) -> bool

Is the alpha component of this color less than or equal to 0.0?

source

fn is_fully_opaque(&self) -> bool

Is the alpha component of this color greater than or equal to 1.0?

Object Safety§

This trait is not object safe.

Implementors§