MCPcopy Create free account
hub / github.com/cbm80amiga/Arduino_ST7789_Fast / fillRect

Method fillRect

Arduino_ST7789_Fast.cpp:479–490  ·  view source on GitHub ↗

----------------------------------------------------------

Source from the content-addressed store, hash-verified

477
478// ----------------------------------------------------------
479void Arduino_ST7789::fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
480{
481 if(x>=_width || y>=_height || w<=0 || h<=0) return;
482 if(x+w-1>=_width) w=_width -x;
483 if(y+h-1>=_height) h=_height-y;
484 setAddrWindow(x, y, x+w-1, y+h-1);
485
486 writeMulti(color,w*h);
487
488 CS_IDLE;
489 SPI_END;
490}
491
492// ----------------------------------------------------------
493// draws image from RAM

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected