caemor / epd-waveshare

Drivers for various EPDs from Waveshare and others
ISC License
227 stars 137 forks source link

Default color for `Display` #213

Closed andber1 closed 3 weeks ago

andber1 commented 3 weeks ago

In graphics.rs it says:

If you want a specific default color, you can still call clear() to set one.

see here

But I cannot find a clear method for the Display struct. Am I missing something? There is a clear_frame method for the EPDs. But that does not change the display buffer.

I am asking because after updating to 0.6 the "background" color of my 2in9_v2 display is suddenly black (instead of white). In version 0.5 the Display2in9 buffer was initialized with 0xff.

andber1 commented 3 weeks ago

I forgot the use embedded_graphics::prelude::*;. It works fine:

use embedded_graphics::prelude::*;
display.clear(Color::White)?;