LCOV - code coverage report
Current view: top level - src/Display - DisplayInterface.cpp (source / functions) Coverage Total Hit
Test: 73449d9b107c772cf65493691543348214e5d5eb Lines: 0.0 % 39 0
Test Date: 2026-06-06 17:44:35 Functions: 0.0 % 4 0
Legend: Lines:     hit not hit

            Line data    Source code
       1              : #include "DisplayInterface.hpp"
       2              : 
       3              : BEGIN_CS_NAMESPACE
       4              : 
       5            0 : void DisplayInterface::begin() {
       6            0 :     clear();
       7            0 :     drawBackground();
       8            0 :     display();
       9            0 : }
      10              : 
      11            0 : void DisplayInterface::fillRect(int16_t x, int16_t y, int16_t w, int16_t h,
      12              :                                 uint16_t color) {
      13            0 :     for (int16_t r = y; r < y + h; r++)
      14            0 :         drawFastHLine(x, r, w, color);
      15            0 : }
      16              : 
      17            0 : void DisplayInterface::drawCircle(int16_t x0, int16_t y0, int16_t r,
      18              :                                   uint16_t color) {
      19            0 :     int x = r;
      20            0 :     int y = 0;
      21            0 :     int err = 0;
      22              : 
      23            0 :     while (x >= y) {
      24            0 :         drawPixel(x0 + x, y0 + y, color);
      25            0 :         drawPixel(x0 + y, y0 + x, color);
      26            0 :         drawPixel(x0 - y, y0 + x, color);
      27            0 :         drawPixel(x0 - x, y0 + y, color);
      28            0 :         drawPixel(x0 - x, y0 - y, color);
      29            0 :         drawPixel(x0 - y, y0 - x, color);
      30            0 :         drawPixel(x0 + y, y0 - x, color);
      31            0 :         drawPixel(x0 + x, y0 - y, color);
      32              : 
      33            0 :         if (err <= 0)
      34            0 :             err += 2 * ++y + 1;
      35              :         else
      36            0 :             err -= 2 * --x + 1;
      37              :     }
      38            0 : }
      39              : 
      40            0 : void DisplayInterface::fillCircle(int16_t x0, int16_t y0, int16_t r,
      41              :                                   uint16_t color) {
      42            0 :     int x = r;
      43            0 :     int y = 0;
      44            0 :     int err = 0;
      45              : 
      46            0 :     while (x >= y) {
      47            0 :         drawFastHLine(x0 - x, y0 + y, 2 * x, color);
      48            0 :         drawFastHLine(x0 - y, y0 + x, 2 * y, color);
      49            0 :         drawFastHLine(x0 - y, y0 - x, 2 * y, color);
      50            0 :         drawFastHLine(x0 - x, y0 - y, 2 * x, color);
      51              : 
      52            0 :         if (err <= 0)
      53            0 :             err += 2 * ++y + 1;
      54              :         else
      55            0 :             err -= 2 * --x + 1;
      56              :     }
      57            0 : }
      58              : 
      59              : END_CS_NAMESPACE
        

Generated by: LCOV version 2.4-beta