yuri91 / ili9341-rs

A WIP, no_std, generic driver for the ILI9341 (and ILI9340C) TFT LCD display
Apache License 2.0
57 stars 50 forks source link

Broken drawing of some rectangles using embedded-graphics #12

Closed rfuest closed 2 years ago

rfuest commented 4 years ago

The accelerated draw_rectangle method in the DrawTrait impl doesn't work correctly for rectangles with only a stroke applied (e.g. PrimaryStyle::with_stroke(Rgb565::RED, 10)), because the embedded-graphics iterator skips the transparent pixels.

I would suggest to simply fall back to unaccelerated drawing if fill_color.is_none() at the moment. We plan to change the DrawTarget trait soon, which should make it easier to implement it correctly. If you have any suggestions how we could improve the interface, from a driver author perspective, the discussion about the changes is in https://github.com/jamwaffles/embedded-graphics/issues/330.

yuri91 commented 4 years ago

Thanks for pointing out this bug! I will also try to think if I have suggestions for the new trait!

yuri91 commented 2 years ago

closing since embedded-graphics changed a lot since this was opened