Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background_color is misused on color displays #100

Open
Liamolucko opened this issue Feb 22, 2022 · 1 comment · May be fixed by #108
Open

background_color is misused on color displays #100

Liamolucko opened this issue Feb 22, 2022 · 1 comment · May be fixed by #108

Comments

@Liamolucko
Copy link

For some reason, all of the color displays seem to be using their background color as the color to set the chromatic layer to when rendering in black-and-white. This means that if their background color is set to black, the whole display gets set to red. (Also, after doing that by accident, it seems to have permanently washed out my display's red color; it might be because it was trying to set a pixel to black and red at the same time?)
On top of that, a lot of them don't actually use it as the color to clear the display in clear_frame either, just using the default background color.

As an aside, background_color seems a bit odd in general; it's only used for clear_frame, and doesn't actually affect the background color when rendering with embedded-graphics. Is it really needed?

@caemor
Copy link
Owner

caemor commented Mar 9, 2022

The idea was to be able to change the background_color while running your program (with set_background_color) but it makes more sense to clean this up by removing this feature and delegate the drawing part to embedded_graphics and the user where needed.

Liamolucko added a commit to Liamolucko/epd-waveshare that referenced this issue Apr 9, 2022
Resolves caemor#100

I did find one display which was using `background_color` for stuff other than `clear_frame` - the epd5in16f was using it to set the border color. For now, I've replaced it with a `set_border_color` method which is only on that display. It should eventually be replaced by a proper method on `WaveshareDisplay`, but I don't have any hardware which supports border colors that I can test with.
@Liamolucko Liamolucko linked a pull request Apr 18, 2022 that will close this issue
Liamolucko added a commit to Liamolucko/epd-waveshare that referenced this issue Apr 18, 2022
Resolves caemor#100

I did find one display which was using `background_color` for stuff other than `clear_frame` - the epd5in16f was using it to set the border color. For now, I've replaced it with a `set_border_color` method which is only on that display. It should eventually be replaced by a proper method on `WaveshareDisplay`, but I don't have any hardware which supports border colors that I can test with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants