28 lines
512 B
Rust
28 lines
512 B
Rust
use embedded_graphics::{
|
|
pixelcolor::{BinaryColor, PixelColor},
|
|
prelude::*,
|
|
primitives::{Circle, Rectangle},
|
|
};
|
|
use embedded_layout::prelude::*;
|
|
|
|
pub struct BulletCounter<C> {
|
|
pub top_left: Point,
|
|
pub size: Size, // Available space
|
|
pub color: C,
|
|
}
|
|
|
|
impl<C> Drawable for BulletCounter<C>
|
|
where
|
|
C: PixelColor + From<BinaryColor>,
|
|
{
|
|
type Color = C;
|
|
type Output = ();
|
|
|
|
fn draw<D>(&self, target: &mut D) -> Result<Self::Output, D::Error>
|
|
where
|
|
D: DrawTarget<Color = C>,
|
|
{
|
|
Ok(())
|
|
}
|
|
}
|