Commit bdcbca43 authored by Bodmer's avatar Bodmer

Fix ePaper 1bpp width bug

parent 235887d8
......@@ -49,7 +49,7 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
if ( w < 1 || h < 1 ) return NULL;
_iwidth = _dwidth = w;
_iwidth = _dwidth = _bitwidth = w;
_iheight = _dheight = h;
this->cursor_x = 0;
......@@ -703,7 +703,7 @@ int16_t TFT_eSprite::width(void)
if (_rotation == 1 || _rotation == 3) return _dheight;
return _dwidth;
return _bitwidth;
}
......@@ -1568,6 +1568,7 @@ void TFT_eSprite::printToSprite(String string)
char cbuffer[len + 1]; // Add 1 for the null
string.toCharArray(cbuffer, len + 1); // Add 1 for the null, otherwise characters get dropped
printToSprite(cbuffer, len);
//printToSprite((char*)string.c_str(), string.length());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment