Trait orbtk::Renderer []

pub trait Renderer {
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn data(&self) -> &[Color];
    fn data_mut(&mut self) -> &mut [Color];
    fn sync(&mut self) -> bool;

    fn pixel(&mut self, x: i32, y: i32, color: Color) { ... }
    fn arc(&mut self, x0: i32, y0: i32, radius: i32, parts: u8, color: Color) { ... }
    fn circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color) { ... }
    fn line(&mut self,
            argx1: i32,
            argy1: i32,
            argx2: i32,
            argy2: i32,
            color: Color) { ... } fn lines(&mut self, points: &[[i32; 2]], color: Color) { ... } fn draw_path_stroke(&mut self, graphicspath: GraphicsPath, color: Color) { ... } fn char(&mut self, x: i32, y: i32, c: char, color: Color) { ... } fn set(&mut self, color: Color) { ... } fn clear(&mut self) { ... } fn rect(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color) { ... } fn image(&mut self,
             start_x: i32,
             start_y: i32,
             w: u32,
             h: u32,
             data: &[Color]) { ... } fn linear_gradient(&mut self,
                       rect_x: i32,
                       rect_y: i32,
                       rect_width: u32,
                       rect_height: u32,
                       start_x: i32,
                       start_y: i32,
                       end_x: i32,
                       end_y: i32,
                       start_color: Color,
                       end_color: Color) { ... } fn rounded_rect(&mut self,
                    x: i32,
                    y: i32,
                    w: u32,
                    h: u32,
                    radius: u32,
                    filled: bool,
                    color: Color) { ... } }

Required Methods

Get width

Get height

Access the pixel buffer

Access the pixel buffer mutably

Flip the buffer

Provided Methods

Draw a pixel

Draw a piece of an arc. Negative radius will fill in the inside

Draw a circle. Negative radius will fill in the inside

Draw a line

Draw a path (GraphicsPath)

Draw a character, using the loaded font

Set entire window to a color

Sets the whole window to black

Draw rectangle

Display an image

Draw a linear gradient in a rectangular region

Draw a rect with rounded corners

Implementors