Trait nes_ppu::PixelBuffer

source ·
pub trait PixelBuffer {
    // Required method
    fn set_color(&mut self, x: u8, y: u8, color: Color, emphasis: ColorEmphasis);
}
Expand description

Receives pixel information from the PPU as it draws.

This trait allows for the Ppu to be used with any graphical (or otherwise) frontend.

Required Methods§

source

fn set_color(&mut self, x: u8, y: u8, color: Color, emphasis: ColorEmphasis)

Sets the color of the pixel at the given x/y coordinate to that specified by color, and modulated by emphasis.

x is always in the range 0..=255 and specifies distance from the left side of the screen. y is always in the range 0..=239 and specifies distance from the top of the screen.

Implementors§