Adding support for polylines, wind and cog

This commit is contained in:
2020-05-26 11:24:12 +02:00
parent dd614b922a
commit b8d0c9f307
2 changed files with 45 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ fn main() -> Result<(), Box<dyn Error>> {
let mut screen = forms::Screen::new(200, 200);
let c = forms::load_compass_rose();
let b = forms::load_boat();
let cog = forms::load_cog();
let wind = forms::load_wind();
/*
let mut img = RgbImage::new(480, 320);
@@ -33,13 +35,16 @@ fn main() -> Result<(), Box<dyn Error>> {
let mut e = ilidisplay::IliDisplay::init()?;
e.init_chip();
e.turn_on();
for i in 0..100 {
for i in 0..10 {
let rad = (i as f32) * 2.0*PI / 100.0;
screen.clear();
screen.render(&cog, -rad*2.0, 500, 500);
screen.render(&wind, rad*2.0, 500, 500);
screen.render(&c, rad, 500, 500);
screen.render(&b, 0.0, 500, 500);
e.put_image(&(screen.image), ((240-100), (160-100)));
}
screen.save();
// draw_filled_rect_mut(&mut img, Rect::at(0,0).of_size(480, 320), Rgb([0, 0, 0]));