blit-gui 0.1.0

2d drawing for blit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use blit::{Paint, Ui, Widget, state};

#[derive(Clone, Copy, Default, PartialEq, Eq, Hash)]
pub struct Clear;

impl<C: Paint<Clear, Scalar = f32>> Widget<C, state::Insert> for Clear {
    type Response = ();

    fn build(self, mut ui: Ui<'_, C, state::Insert>) {
        ui.paint(move |cx, area| cx.context_mut().paint(area, &self));
    }
}