Graphics Lib
This is a simple wrapper around Pixels, designed to be used with Buffer Graphlics Lib
Usage
Cargo
In your Cargo.toml
file add
= "0.5.2"
= "0.27.2"
= "0.13.0"
Code
This bit of boilerplate/framework must be used inside your code to use this library:
let event_loop = new;
let mut input = new;
let = setup?;
event_loop.run;
Features
window_prefs
Save and restore window position and size
Code
First an instance of WindowPreferences
has be created:
let mut prefs = new?;
Then the file has to be created/loaded with
prefs.load()?;
To set the window size and position call
prefs.restore(&mut window);
To store the window size and position call
prefs.store(&window);
This only saves the data to memory, to save to disk call
prefs.save()?;
(after store()
)