Seeed-Studio / Seeed_Arduino_Linechart

This library is a very lightweight library which can help you with the linechart graph you need.
MIT License
6 stars 7 forks source link

Unfilled ellipses are not the default and fill(transparent) doesn't work. #5

Closed derekmulcahy closed 4 years ago

derekmulcahy commented 4 years ago

I was trying to draw an unfilled ellipse. This code draws an unfilled ellipse and not a black filled ellipse.

    ellipse(tft.width()/2, tft.height()/2, 40, 40)
                    .fill((color_t)TFT_BLACK)
                    .draw();

This code draws an ellipse filled with black.

    ellipse(tft.width()/2, tft.height()/2, 40, 40)
                    .fill(transparent)
                    .draw();

I think the issue is the use of _fill as both a boolean and a value. It looks like seeed_graphics_base.cpp:102 should be

if (_fill != transparent) {

and not

if (_fill) {

derekmulcahy commented 4 years ago

Fixed by PR #6

derekmulcahy commented 4 years ago

Fixed and tested!