Trait pixel_engine_draw::traits::ScreenTrait[][src]

pub trait ScreenTrait {
    fn get_size(&self) -> (u32, u32);
fn get_textsheet(&self) -> &Sprite;
fn clear(&mut self, col: Color);
fn draw<P: Into<Vu2d>>(&mut self, pos: P, col: Color);
fn get_pixel<P: Into<Vu2d>>(&self, pos: P) -> Color;
fn get_pixel_mode(&self) -> PixelMode;
fn set_pixel_mode(&mut self, mode: PixelMode);
fn get_blend_factor(&self) -> f32;
fn set_blend_factor(&mut self, f: f32); }

The Basic Drawing Trait All that is needed to draw one pixel one the target

Required methods

fn get_size(&self) -> (u32, u32)[src]

Get the size of the target

fn get_textsheet(&self) -> &Sprite[src]

Get The textsheet (A Sprite)

fn clear(&mut self, col: Color)[src]

Clear the Screen With the given Color

fn draw<P: Into<Vu2d>>(&mut self, pos: P, col: Color)[src]

Set the pixel data at the given coordinates to the given Color Will use the current PixelMode

fn get_pixel<P: Into<Vu2d>>(&self, pos: P) -> Color[src]

Get the Pixel Data at the given coordinates

fn get_pixel_mode(&self) -> PixelMode[src]

Return the PixelMode

fn set_pixel_mode(&mut self, mode: PixelMode)[src]

Set the PixelMode

fn get_blend_factor(&self) -> f32[src]

Get the Blend Factor Used for alpha calculations

fn set_blend_factor(&mut self, f: f32)[src]

Set the Blend Factor Used for alpha calculations

Loading content...

Implementors

Loading content...