Skip to main content

RaylibScissorModeExt

Trait RaylibScissorModeExt 

Source
pub trait RaylibScissorModeExt: Sized {
    // Provided methods
    fn begin_scissor_mode(
        &mut self,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
    ) -> RaylibScissorMode<'_, Self> { ... }
    fn draw_scissor_mode(
        &mut self,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
        func: impl FnMut(RaylibScissorMode<'_, Self>),
    ) { ... }
}

Provided Methods§

Source

fn begin_scissor_mode( &mut self, x: i32, y: i32, width: i32, height: i32, ) -> RaylibScissorMode<'_, Self>

Begin scissor mode (define screen area for following drawing). Prefer using the closure version, RaylibScissorModeExt::draw_scissor_mode. This version returns a handle that calls raylib_sys::EndScissorMode 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_scissor_mode( &mut self, x: i32, y: i32, width: i32, height: i32, func: impl FnMut(RaylibScissorMode<'_, 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§