Add support for 1 bit per pixel in Sprite class
This is stage one of support for ePaper displays from Waveshare. Examples for 1 bit per pixel Sprites and 2 or 3 colour ePaper displays to follow soon.
This commit is contained in:
1 parent
1db0c30b81
commit
9276b0162d
12 files changed
+883
-290
No files matched your search
@@ -74,14 +74,14 @@ void TFT_eSPI::loadFont(String fontName)
|
||||
|
||||
*/
|
||||
|
||||
unloadFont();
|
||||
|
||||
_gFontFilename = "/" + fontName + ".vlw";
|
||||
|
||||
fontFile = SPIFFS.open( _gFontFilename, "r");
|
||||
|
||||
if(!fontFile) return;
|
||||
|
||||
//unloadFont();
|
||||
|
||||
fontFile.seek(0, fs::SeekSet);
|
||||
|
||||
gFont.gCount = (uint16_t)readInt32(); // glyph count in file
|
||||
@@ -230,7 +230,8 @@ void TFT_eSPI::unloadFont( void )
|
||||
free(gBitmap);
|
||||
gBitmap = NULL;
|
||||
}
|
||||
fontFile.close();
|
||||
|
||||
if(fontFile) fontFile.close();
|
||||
fontLoaded = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user