MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / drawRect

Method drawRect

src/DisplayManager.cpp:2543–2555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2541// ### DRAWING FUNCTIONS ###
2542
2543void DisplayManager_::drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint32_t color)
2544{
2545 for (int16_t i = x; i < x + w; i++)
2546 {
2547 matrix->drawPixel(i, y, color);
2548 matrix->drawPixel(i, y + h - 1, color);
2549 }
2550 for (int16_t i = y; i < y + h; i++)
2551 {
2552 matrix->drawPixel(x, i, color);
2553 matrix->drawPixel(x + w - 1, i, color);
2554 }
2555}
2556
2557void DisplayManager_::drawFastVLine(int16_t x, int16_t y, int16_t h, uint32_t color)
2558{

Callers 1

ShowCustomAppFunction · 0.80

Calls 1

drawPixelMethod · 0.80

Tested by

no test coverage detected