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

Method drawImage

Arduino_ST7789_Fast.cpp:494–507  ·  view source on GitHub ↗

---------------------------------------------------------- draws image from RAM

Source from the content-addressed store, hash-verified

492// ----------------------------------------------------------
493// draws image from RAM
494void Arduino_ST7789::drawImage(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t *img16)
495{
496 // all protections should be on the application side
497 if(w<=0 || h<=0) return; // left for compatibility
498 //if(x>=_width || y>=_height || w<=0 || h<=0) return;
499 //if(x+w-1>=_width) w=_width -x;
500 //if(y+h-1>=_height) h=_height-y;
501 setAddrWindow(x, y, x+w-1, y+h-1);
502
503 copyMulti((uint8_t *)img16, w*h);
504
505 CS_IDLE;
506 SPI_END;
507}
508
509// ----------------------------------------------------------
510// draws image from flash (PROGMEM)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected