Crate pixels_graphics_lib

Source
Expand description

Rust Graphics Lib

This is a simple pixel graphics and GUI library, it provides basic shape, image and text rendering.

This boilerplate code is needed to use it:


struct Example {
}

impl System for Example {
  fn update(&mut self, timing: &Timing, _: &Window) {

  }

  fn render(&mut self, graphics: &mut Graphics) {

  }
}

fn main() -> Result<(), Box<dyn Error>> {
let system = Example {};
  run(240, 160, "Doc Example", Box::new(system), Options::default())?;
  Ok(())
}

Re-exports§

pub use buffer_graphics_lib;

Modules§

dialogs
prelude
scenes
ui
utilities
window_prefs

Macros§

bounds
column_layout
Update the position multiple views to be in a column if gravity is
layout
Position and size a view relative to the parent or another view
or_else
parent
px
render
row_layout
Update the position multiple views to be in a row if gravity is
swap_focus
Set focus on the first view passed, clear focus on all others
unfocus
Clear focus on all views

Structs§

MouseData
Options
Options for program windows

Enums§

GraphicsError
WindowScaling

Traits§

System