Function firefly_rust::graphics::clear_screen

source ยท
pub fn clear_screen(c: Color)
Expand description

Fill the whole frame with the given color.

Examples found in repository?
examples/image/main.rs (line 25)
24
25
26
27
28
29
extern fn update() {
    ff::clear_screen(ff::Color::White);
    let image = unsafe { IMAGE.get().unwrap() };
    let image: ff::Image = (image).into();
    ff::draw_image(&image, ff::Point { x: 60, y: 60 });
}
More examples
Hide additional examples
examples/triangle/main.rs (line 7)
6
7
8
9
10
11
12
13
14
15
16
17
18
extern fn boot() {
    ff::clear_screen(ff::Color::White);
    ff::draw_triangle(
        ff::Point { x: 60, y: 10 },
        ff::Point { x: 40, y: 40 },
        ff::Point { x: 80, y: 40 },
        ff::Style {
            fill_color:   ff::Color::LightGray,
            stroke_color: ff::Color::DarkBlue,
            stroke_width: 1,
        },
    );
}