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§
sourcefn with_alpha(&self, alpha: f32) -> Self
fn with_alpha(&self, alpha: f32) -> Self
Return a new version of this color with the given alpha value.
Provided Methods§
sourcefn is_fully_transparent(&self) -> bool
fn is_fully_transparent(&self) -> bool
Is the alpha component of this color less than or equal to 0.0?
sourcefn is_fully_opaque(&self) -> bool
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.