Move to SDK EInkDisplay and enable anti-aliased 2-bit text (#5)
* First pass at moving to SDK EInkDisplay library * Add 2-bit grayscale text and anti-aliased rendering of text * Render status bar for empty chapters * Refresh screen every 15 pages to avoid ghosting * Simplify boot and sleep screens * Give FileSelectionScreen task more stack memory * Move text around slightly on Boot and Sleep screens * Re-use existing buffer and write to whole screen for 'partial update'
This commit is contained in:
@@ -2,23 +2,22 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "EpdFontFamily.h"
|
||||
#include <EInkDisplay.h>
|
||||
#include <EpdFontFamily.h>
|
||||
#include "Screen.h"
|
||||
|
||||
class FullScreenMessageScreen final : public Screen {
|
||||
std::string text;
|
||||
EpdFontStyle style;
|
||||
bool invert;
|
||||
bool partialUpdate;
|
||||
EInkDisplay::RefreshMode refreshMode;
|
||||
|
||||
public:
|
||||
explicit FullScreenMessageScreen(EpdRenderer& renderer, InputManager& inputManager, std::string text,
|
||||
const EpdFontStyle style = REGULAR, const bool invert = false,
|
||||
const bool partialUpdate = true)
|
||||
const EpdFontStyle style = REGULAR,
|
||||
const EInkDisplay::RefreshMode refreshMode = EInkDisplay::FAST_REFRESH)
|
||||
: Screen(renderer, inputManager),
|
||||
text(std::move(text)),
|
||||
style(style),
|
||||
invert(invert),
|
||||
partialUpdate(partialUpdate) {}
|
||||
refreshMode(refreshMode) {}
|
||||
void onEnter() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user