Skip to main content

RaylibBlendModeExt

Trait RaylibBlendModeExt 

Source
pub trait RaylibBlendModeExt: Sized {
    // Provided methods
    fn begin_blend_mode(
        &mut self,
        blend_mode: BlendMode,
    ) -> RaylibBlendMode<'_, Self> { ... }
    fn draw_blend_mode(
        &mut self,
        blend_mode: BlendMode,
        func: impl FnMut(RaylibBlendMode<'_, Self>),
    ) { ... }
}

Provided Methods§

Source

fn begin_blend_mode( &mut self, blend_mode: BlendMode, ) -> RaylibBlendMode<'_, Self>

Begin blending mode (alpha, additive, multiplied, subtract, custom). Prefer using the closure version, RaylibBlendModeExt::draw_blend_mode. This version returns a handle that calls raylib_sys::EndBlendMode at the end of the scope and is provided as a fallback incase you run into issues with closures(such as lifetime or performance reasons)

Source

fn draw_blend_mode( &mut self, blend_mode: BlendMode, func: impl FnMut(RaylibBlendMode<'_, Self>), )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<D> RaylibBlendModeExt for D
where D: RaylibDraw,