mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-26 22:10:52 +00:00
Merge pull request #493 from bobmoss/fix-fillellipse-function
Modified fillEllipse to use writeFastHLine instead of drawFastHLine
This commit is contained in:
1 file changed
+4
-4
+4
-4
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user