devotee_backend

Trait RenderSurface

source
pub trait RenderSurface {
    type Data;

    // Required methods
    fn width(&self) -> usize;
    fn height(&self) -> usize;
    fn data(&self, x: usize, y: usize) -> Self::Data;
}
Expand description

The surface for the Application to perform rendering on.

Required Associated Types§

source

type Data

Pixel data to be returned to the Middleware’s render target.

Required Methods§

source

fn width(&self) -> usize

Get the width of the render surface in pixels.

source

fn height(&self) -> usize

Get the height of the render surface in pixels.

source

fn data(&self, x: usize, y: usize) -> Self::Data

Get specific pixel data.

§Panics

For values outside of safe range may panic or may return garbage value.

Implementors§