** Function name: pushSprite ** Description: Push the sprite to the TFT at x, y ***************************************************************************************/
| 657 | ** Description: Push the sprite to the TFT at x, y |
| 658 | ***************************************************************************************/ |
| 659 | void TFT_eSprite::pushSprite(int32_t x, int32_t y) |
| 660 | { |
| 661 | if (!_created) return; |
| 662 | |
| 663 | if (_bpp == 16) |
| 664 | { |
| 665 | bool oldSwapBytes = _tft->getSwapBytes(); |
| 666 | _tft->setSwapBytes(false); |
| 667 | _tft->pushImage(x, y, _dwidth, _dheight, _img ); |
| 668 | _tft->setSwapBytes(oldSwapBytes); |
| 669 | } |
| 670 | else if (_bpp == 4) |
| 671 | { |
| 672 | _tft->pushImage(x, y, _dwidth, _dheight, _img4, false, _colorMap); |
| 673 | } |
| 674 | else _tft->pushImage(x, y, _dwidth, _dheight, _img8, (bool)(_bpp == 8)); |
| 675 | } |
| 676 | |
| 677 | |
| 678 | /*************************************************************************************** |
nothing calls this directly
no test coverage detected