Crate buffer_graphics_lib

Source
Expand description

Buffer Graphics Lib

This is a simple graphics library for drawing to a buffer, mainly designed to be used with Rust Graphics Library or Pixels

It has basic shape drawing, bitmap text and image rendering.

Using the library is as simple as:

 let mut buffer = Graphics::create_buffer_u8(800, 600); //800 x 600 RGBA
 let mut graphics = Graphics::new_u8_rgba(&mut buffer, 800, 600).unwrap();
 let text = Text::new("Some text", TextPos::cr((1,1)), (LIGHT_GRAY, PixelFont::Standard6x7));
 graphics.draw(&text);
 graphics.draw_rect(Rect::new((40, 50), (100, 100)), stroke(BLUE));

Modules§

clipping
drawable
drawing
image
indexed
integration
prelude
renderable_image
renderable_macros
scaling
shapes
text

Macros§

renderable
sized_renderable

Structs§

CustomLetter
Only the letter sizes you’ll use need to be set
Graphics

Enums§

GraphicsBuffer
GraphicsError

Functions§

make_image
Create an image widthxheight px and then run drawing commands on it
make_indexed_image
Create an indexed image widthxheight px and then run drawing commands on it