pub trait FramebufferDraw {
    fn draw_image(&mut self, img: &RgbImage, pos: Point2<i32>) -> mxcfb_rect;
    fn draw_line(
        &mut self,
        start: Point2<i32>,
        end: Point2<i32>,
        width: u32,
        v: color
    ) -> mxcfb_rect; fn draw_circle(&mut self, pos: Point2<i32>, rad: u32, c: color) -> mxcfb_rect; fn fill_circle(&mut self, pos: Point2<i32>, rad: u32, c: color) -> mxcfb_rect; fn draw_polygon(
        &mut self,
        _: &[Point2<i32>],
        fill: bool,
        c: color
    ) -> mxcfb_rect; fn draw_bezier(
        &mut self,
        startpt: Point2<f32>,
        ctrlpt: Point2<f32>,
        endpt: Point2<f32>,
        width: f32,
        samples: i32,
        v: color
    ) -> mxcfb_rect; fn draw_dynamic_bezier(
        &mut self,
        startpt: (Point2<f32>, f32),
        ctrlpt: (Point2<f32>, f32),
        endpt: (Point2<f32>, f32),
        samples: i32,
        v: color
    ) -> mxcfb_rect; fn draw_text(
        &mut self,
        pos: Point2<f32>,
        text: &str,
        size: f32,
        col: color,
        dryrun: bool
    ) -> mxcfb_rect; fn draw_rect(
        &mut self,
        pos: Point2<i32>,
        size: Vector2<u32>,
        border_px: u32,
        c: color
    ); fn fill_rect(&mut self, pos: Point2<i32>, size: Vector2<u32>, c: color); fn clear(&mut self); }

Required Methods§

Draws img at pos with 1:1 scaling

Draws a straight line

Draws a circle using Bresenham circle algorithm

Fills a circle

Draws a polygon

Draws a bezier curve begining at startpt, with control point ctrlpt, ending at endpt with color

Draws a bezier curve begining at startpt, with control point ctrlpt, ending at endpt with a width at each point and color color

Draws text at pos with color using scale size

Draws a 1px border rectangle of size size at pos with border_px border thickness

Fills rectangle of size size at pos

Clears the framebuffer however does not perform a refresh

Implementors§