Skip to main content

clear_screen

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