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.
The accelerated
draw_rectangle
method in theDrawTrait
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 theDrawTarget
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.