pub trait ToAlpha: Sized {
// Required method
fn to_alpha(&self) -> f32;
// Provided methods
fn fully_opaque(&self) -> bool { ... }
fn fully_transparent(&self) -> bool { ... }
}Expand description
Trait for extracting the alpha channel of a color.
Required Methods§
Provided Methods§
Sourcefn fully_opaque(&self) -> bool
fn fully_opaque(&self) -> bool
Returns true if the alpha of this colour is 100.0
Sourcefn fully_transparent(&self) -> bool
fn fully_transparent(&self) -> bool
Returns true if the alpha of this colour is 0.0
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".