Skip to content

Commit

Permalink
Fixed wrong behavior when drawEllipse and fillEllipse width is 0 ( #544
Browse files Browse the repository at this point in the history
… )
  • Loading branch information
lovyan03 committed Mar 20, 2024
1 parent 73de472 commit 2579b3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lgfx/v1/LGFXBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,11 @@ namespace lgfx
void LGFXBase::drawEllipse(int32_t x, int32_t y, int32_t rx, int32_t ry)
{
if (ry == 0) {
drawFastHLine(x - rx, y, (ry << 2) + 1);
drawFastHLine(x - rx, y, (rx << 1) + 1);
return;
}
if (rx == 0) {
drawFastVLine(x, y - ry, (rx << 2) + 1);
drawFastVLine(x, y - ry, (ry << 1) + 1);
return;
}
if (rx < 0 || ry < 0) return;
Expand Down Expand Up @@ -391,11 +391,11 @@ namespace lgfx
void LGFXBase::fillEllipse(int32_t x, int32_t y, int32_t rx, int32_t ry)
{
if (ry == 0) {
drawFastHLine(x - rx, y, (ry << 2) + 1);
drawFastHLine(x - rx, y, (rx << 1) + 1);
return;
}
if (rx == 0) {
drawFastVLine(x, y - ry, (rx << 2) + 1);
drawFastVLine(x, y - ry, (ry << 1) + 1);
return;
}
if (rx < 0 || ry < 0) return;
Expand Down

0 comments on commit 2579b3e

Please sign in to comment.