Modified fillEllipse to use writeFastHLine instead of drawFastHLine

This commit is contained in:
Bob Moss committed 2025-11-28 11:10:51 +00:00
1 parent e4df4cc64f
commit d68f27b7bf
1 file changed
+4 -4
+4 -4
View File
@@ -435,8 +435,8 @@ void Adafruit_GFX::fillEllipse(int16_t x0, int16_t y0, int16_t rw, int16_t rh,
decision += rh2 + (twoRh2 * x);
} else {
decision += rh2 + (twoRh2 * x) - (twoRw2 * y);
drawFastHLine(x0 - (x - 1), y0 + y, 2 * (x - 1) + 1, color);
drawFastHLine(x0 - (x - 1), y0 - y, 2 * (x - 1) + 1, color);
writeFastHLine(x0 - (x - 1), y0 + y, 2 * (x - 1) + 1, color);
writeFastHLine(x0 - (x - 1), y0 - y, 2 * (x - 1) + 1, color);
y--;
}
}
@@ -445,8 +445,8 @@ void Adafruit_GFX::fillEllipse(int16_t x0, int16_t y0, int16_t rw, int16_t rh,
decision = ((rh2 * (2 * x + 1) * (2 * x + 1)) >> 2) +
(rw2 * (y - 1) * (y - 1)) - (rw2 * rh2);
while (y >= 0) {
drawFastHLine(x0 - x, y0 + y, 2 * x + 1, color);
drawFastHLine(x0 - x, y0 - y, 2 * x + 1, color);
writeFastHLine(x0 - x, y0 + y, 2 * x + 1, color);
writeFastHLine(x0 - x, y0 - y, 2 * x + 1, color);
y--;
if (decision > 0) {