| 285 | |
| 286 | |
| 287 | void OLEDDisplay::fillCircle(int16_t x0, int16_t y0, int16_t radius) { |
| 288 | int16_t x = 0, y = radius; |
| 289 | int16_t dp = 1 - radius; |
| 290 | do { |
| 291 | if (dp < 0) |
| 292 | dp = dp + (x++) * 2 + 3; |
| 293 | else |
| 294 | dp = dp + (x++) * 2 - (y--) * 2 + 5; |
| 295 | |
| 296 | drawHorizontalLine(x0 - x, y0 - y, 2*x); |
| 297 | drawHorizontalLine(x0 - x, y0 + y, 2*x); |
| 298 | drawHorizontalLine(x0 - y, y0 - x, 2*y); |
| 299 | drawHorizontalLine(x0 - y, y0 + x, 2*y); |
| 300 | |
| 301 | |
| 302 | } while (x < y); |
| 303 | drawHorizontalLine(x0 - radius, y0, 2 * radius); |
| 304 | |
| 305 | } |
| 306 | |
| 307 | void OLEDDisplay::drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, |
| 308 | int16_t x2, int16_t y2) { |
nothing calls this directly
no outgoing calls
no test coverage detected