clear canvas properly
This commit is contained in:
parent
5a759ea096
commit
0953497a79
1 changed files with 2 additions and 5 deletions
|
@ -55,10 +55,6 @@ pub fn main() {
|
|||
, end: Position{x: width / 4, y: 3 * height / 4}}
|
||||
]};
|
||||
|
||||
canvas.set_draw_color(Color::RGB(0, 0, 0));
|
||||
canvas.clear();
|
||||
canvas.present();
|
||||
|
||||
'running: loop {
|
||||
if i % 255 == 0 {
|
||||
flip = !flip;
|
||||
|
@ -69,7 +65,8 @@ pub fn main() {
|
|||
i = i + 1;
|
||||
}
|
||||
//canvas.set_draw_color(Color::RGB(i, 64, 255 - i));
|
||||
//canvas.clear();
|
||||
canvas.set_draw_color(Color::RGB(0, 0, 0));
|
||||
canvas.clear();
|
||||
draw_lines(&canvas, Color::RGB(255 - i, 64, i), & base.lines);
|
||||
for event in event_pump.poll_iter() {
|
||||
match event {
|
||||
|
|
Loading…
Reference in a new issue