pixels-graphics-lib 0.10.5

Simple wrapper library around Pixels/Buffer Graphics
Documentation

Crates.io Documentation

Graphics Lib

This is a simple wrapper around Pixels, designed to be used with Buffer Graphics Lib

Usage

Cargo

In your Cargo.toml file add

pixels-graphics-lib = "0.10.5"
winit_input_helper = "0.14.1" #only needed if you're not using `run()`

Code

This bit of boilerplate/framework must be used inside your code to use this library:

use pixels_graphics_lib::prelude::*;

struct Example {}

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

impl System for Example {
    fn update(&mut self, timing: &Timing) {}
    fn render(&self, graphics: &mut Graphics) {}
}

Features

window_prefs

Save and restore window position and size

To use this the impl System must override System::window_prefs()

Projects

Retro Games

A few retro games

ICI Image editor

Editor for IndexedImage

USFX Tester

Test GUI for USFX