5 releases

0.0.5 Aug 6, 2023
0.0.4 Aug 6, 2023
0.0.3 Jul 23, 2023
0.0.2 Jul 23, 2023
0.0.1 Jul 22, 2023

#330 in Images

50 downloads per month

MIT license

105KB
2.5K SLoC

Tekenen

Simple library for drawing pixels in memory.

IMPORTANT: This library is work in progress, everything is subject to change, use this library at your own risk.

Basic Example

use tekenen::{Tekenen, colors};
use tekenen::platform::{Platform, PlatformTrait, Event, IntervalDecision};

fn main() {
    let mut window = Platform::new(800, 600).unwrap();
    let mut tek = Tekenen::new(800, 600);

    Platform::set_interval(move || {
        while let Some(event) = window.read_events() {
            match event {
                Event::Quit => {
                    return IntervalDecision::Stop
                },
                _ => { }
            }
        }

        tek.background(colors::GRAY);

        window.display_pixels(tek.get_pixels());

        IntervalDecision::Repeat
    }, 60)
}

Dependencies

~0–13MB
~110K SLoC