** Function name: TFT_eSprite ** Description: Class constructor ***************************************************************************************/
| 15 | ** Description: Class constructor |
| 16 | ***************************************************************************************/ |
| 17 | TFT_eSprite::TFT_eSprite(TFT_eSPI *tft) |
| 18 | { |
| 19 | _tft = tft; // Pointer to tft class so we can call member functions |
| 20 | |
| 21 | _iwidth = 0; // Initialise width and height to 0 (it does not exist yet) |
| 22 | _iheight = 0; |
| 23 | _bpp = 16; |
| 24 | _swapBytes = false; // Do not swap pushImage colour bytes by default |
| 25 | |
| 26 | _created = false; |
| 27 | _vpOoB = true; |
| 28 | |
| 29 | _xs = 0; // window bounds for pushColor |
| 30 | _ys = 0; |
| 31 | _xe = 0; |
| 32 | _ye = 0; |
| 33 | |
| 34 | _xptr = 0; // pushColor coordinate |
| 35 | _yptr = 0; |
| 36 | |
| 37 | _colorMap = nullptr; |
| 38 | |
| 39 | _psram_enable = true; |
| 40 | |
| 41 | // Ensure end_tft_write() does nothing in inherited functions. |
| 42 | lockTransaction = true; |
| 43 | } |
| 44 | |
| 45 | |
| 46 | /*************************************************************************************** |
nothing calls this directly
no outgoing calls
no test coverage detected