Framebuffer

Trait Framebuffer 

Source
pub trait Framebuffer {
Show 36 methods // Required methods fn set_pixel(&mut self, x: u32, y: u32, color: Color); fn set_blended_pixel(&mut self, x: u32, y: u32, color: Color, alpha: f32); fn invert_region(&mut self, rect: &Rectangle); fn shift_region(&mut self, rect: &Rectangle, drift: u8); fn update( &mut self, rect: &Rectangle, mode: UpdateMode, ) -> Result<u32, Error>; fn wait(&self, token: u32) -> Result<i32, Error>; fn save(&self, path: &str) -> Result<(), Error>; fn set_rotation(&mut self, n: i8) -> Result<(u32, u32), Error>; fn set_monochrome(&mut self, enable: bool); fn set_dithered(&mut self, enable: bool); fn set_inverted(&mut self, enable: bool); fn monochrome(&self) -> bool; fn dithered(&self) -> bool; fn inverted(&self) -> bool; fn width(&self) -> u32; fn height(&self) -> u32; // Provided methods fn toggle_inverted(&mut self) { ... } fn toggle_monochrome(&mut self) { ... } fn toggle_dithered(&mut self) { ... } fn rotation(&self) -> i8 { ... } fn dims(&self) -> (u32, u32) { ... } fn rect(&self) -> Rectangle { ... } fn clear(&mut self, color: Color) { ... } fn draw_rectangle(&mut self, rect: &Rectangle, color: Color) { ... } fn draw_blended_rectangle( &mut self, rect: &Rectangle, color: Color, alpha: f32, ) { ... } fn draw_rectangle_outline(&mut self, rect: &Rectangle, border: &BorderSpec) { ... } fn draw_pixmap(&mut self, pixmap: &Pixmap, pt: Point) { ... } fn draw_framed_pixmap( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, ) { ... } fn draw_framed_pixmap_contrast( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, exponent: f32, gray: f32, ) { ... } fn draw_framed_pixmap_halftone( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, ) { ... } fn draw_blended_pixmap(&mut self, pixmap: &Pixmap, pt: Point, color: Color) { ... } fn draw_rounded_rectangle( &mut self, rect: &Rectangle, corners: &CornerSpec, color: Color, ) { ... } fn draw_rounded_rectangle_with_border( &mut self, rect: &Rectangle, corners: &CornerSpec, border: &BorderSpec, color: &dyn ColorSource, ) { ... } fn draw_triangle(&mut self, triangle: &[Point], color: Color) { ... } fn draw_disk(&mut self, center: Point, radius: i32, color: Color) { ... } fn draw_segment( &mut self, start: Point, end: Point, start_radius: f32, end_radius: f32, color: Color, ) { ... }
}

Required Methods§

Source

fn set_pixel(&mut self, x: u32, y: u32, color: Color)

Source

fn set_blended_pixel(&mut self, x: u32, y: u32, color: Color, alpha: f32)

Source

fn invert_region(&mut self, rect: &Rectangle)

Source

fn shift_region(&mut self, rect: &Rectangle, drift: u8)

Source

fn update(&mut self, rect: &Rectangle, mode: UpdateMode) -> Result<u32, Error>

Source

fn wait(&self, token: u32) -> Result<i32, Error>

Source

fn save(&self, path: &str) -> Result<(), Error>

Source

fn set_rotation(&mut self, n: i8) -> Result<(u32, u32), Error>

Source

fn set_monochrome(&mut self, enable: bool)

Source

fn set_dithered(&mut self, enable: bool)

Source

fn set_inverted(&mut self, enable: bool)

Source

fn monochrome(&self) -> bool

Source

fn dithered(&self) -> bool

Source

fn inverted(&self) -> bool

Source

fn width(&self) -> u32

Source

fn height(&self) -> u32

Provided Methods§

Source

fn toggle_inverted(&mut self)

Source

fn toggle_monochrome(&mut self)

Source

fn toggle_dithered(&mut self)

Source

fn rotation(&self) -> i8

Source

fn dims(&self) -> (u32, u32)

Source

fn rect(&self) -> Rectangle

Source

fn clear(&mut self, color: Color)

Source

fn draw_rectangle(&mut self, rect: &Rectangle, color: Color)

Source

fn draw_blended_rectangle(&mut self, rect: &Rectangle, color: Color, alpha: f32)

Source

fn draw_rectangle_outline(&mut self, rect: &Rectangle, border: &BorderSpec)

Source

fn draw_pixmap(&mut self, pixmap: &Pixmap, pt: Point)

Source

fn draw_framed_pixmap(&mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point)

Source

fn draw_framed_pixmap_contrast( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, exponent: f32, gray: f32, )

Source

fn draw_framed_pixmap_halftone( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, )

Source

fn draw_blended_pixmap(&mut self, pixmap: &Pixmap, pt: Point, color: Color)

Source

fn draw_rounded_rectangle( &mut self, rect: &Rectangle, corners: &CornerSpec, color: Color, )

Source

fn draw_rounded_rectangle_with_border( &mut self, rect: &Rectangle, corners: &CornerSpec, border: &BorderSpec, color: &dyn ColorSource, )

Source

fn draw_triangle(&mut self, triangle: &[Point], color: Color)

Source

fn draw_disk(&mut self, center: Point, radius: i32, color: Color)

Source

fn draw_segment( &mut self, start: Point, end: Point, start_radius: f32, end_radius: f32, color: Color, )

Implementors§