Update Sprite.cpp

Hi,
I found a bug.

_width and _height need to be initialized properly.

That is because they are used in drawString(). Lines 4118 and 4120 in TFT_eSPI.cpp.
This commit is contained in:
rdts 2018-04-11 19:12:33 +02:00 committed by GitHub
parent 1163817887
commit 82b749a93a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
if ( w < 1 || h < 1 ) return NULL;
_iwidth = _dwidth = w;
_iheight = _dheight = h;
_width = _iwidth = _dwidth = w;
_height = _iheight = _dheight = h;
this->cursor_x = 0;
this->cursor_y = 0;