Custom sleep screen support with BMP reading (#57)
## Summary * Builds on top of https://github.com/daveallie/crosspoint-reader/pull/16 - adresses https://github.com/daveallie/crosspoint-reader/discussions/14 * This PR adds the ability for the user to supply a custom `sleep.bmp` image at the root of the SD card that will be shown instead of the default sleep screen if present. * Supports: * Different BPPs: * 1bit * 2bit * 8bit * 24bit * 32bit (with alpha-channel ignored) * Grayscale rendering --------- Co-authored-by: Sam Davis <sam@sjd.co>
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
|
||||
#include <EInkDisplay.h>
|
||||
#include <EpdFontFamily.h>
|
||||
#include <FS.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "Bitmap.h"
|
||||
|
||||
class GfxRenderer {
|
||||
public:
|
||||
enum RenderMode { BW, GRAYSCALE_LSB, GRAYSCALE_MSB };
|
||||
@@ -45,6 +48,7 @@ class GfxRenderer {
|
||||
void drawRect(int x, int y, int width, int height, bool state = true) const;
|
||||
void fillRect(int x, int y, int width, int height, bool state = true) const;
|
||||
void drawImage(const uint8_t bitmap[], int x, int y, int width, int height) const;
|
||||
void drawBitmap(const Bitmap& bitmap, int x, int y, int maxWidth, int maxHeight) const;
|
||||
|
||||
// Text
|
||||
int getTextWidth(int fontId, const char* text, EpdFontStyle style = REGULAR) const;
|
||||
|
||||
Reference in New Issue
Block a user