Skip to content

Added a filled triangle drawing function

Jeremy Soller requested to merge ca1ek:master into master

Created by: ca1ek

Could use some optimization in the future

Test code:

extern crate orbclient;

use orbclient::window::Window;
use orbclient::color::Color;

fn main() {
    let mut window = Window::new(20, 20, 640, 480, &"Hello!").unwrap();
    let mut counter = 0.0; 
    loop {
        counter += 1.0;
        window.filled_triangle(20, 40, 400, 0 + counter as i32, 200, 200, Color::rgb(255, 0, 0));
        window.sync();
        window.clear();
    }
}

Merge request reports