Enum lotus_script::graphics::textures::AlphaMode
source · pub enum AlphaMode {
Opaque,
Mask(f32),
Blend,
}
Expand description
Controls how alpha (transparency) is handled when drawing.
Variants§
Opaque
The texture is drawn completely opaque, ignoring alpha values. Any pixels drawn will completely replace the existing pixels.
Mask(f32)
Alpha values below the threshold are considered fully transparent, while values above or equal to the threshold are considered fully opaque. The threshold should be between 0.0 and 1.0.
Blend
Alpha values are used to blend the new pixels with existing pixels. The alpha channel determines the opacity of each pixel being drawn.
Trait Implementations§
source§impl<'de> Deserialize<'de> for AlphaMode
impl<'de> Deserialize<'de> for AlphaMode
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AlphaMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<AlphaMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for AlphaMode
impl Serialize for AlphaMode
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for AlphaMode
Auto Trait Implementations§
impl Freeze for AlphaMode
impl RefUnwindSafe for AlphaMode
impl Send for AlphaMode
impl Sync for AlphaMode
impl Unpin for AlphaMode
impl UnwindSafe for AlphaMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more