Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
BitmapDisplay.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <AH/STL/utility> // std::forward
7
9
16template <class Value_t = Interfaces::IValue &>
18 public:
23
24 void draw() override {
25 if (value.getValue())
26 display.drawXBitmap(x, y, xbm.bits, xbm.width, xbm.height, color);
27 value.clearDirty();
28 }
29
30 bool getDirty() const override { return value.getDirty(); }
31
32 private:
33 Value_t value;
34 const XBitmap &xbm;
37};
38
39template <class Value_t = Interfaces::IValue>
40using NoteBitmapDisplay [[deprecated("Use BitmapDisplay instead")]] =
42
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A class that displays a bitmap depending on the state of a MIDINote or any other object that has a ge...
bool getDirty() const override
Check if this DisplayElement has to be re-drawn.
BitmapDisplay(DisplayInterface &display, Value_t &&value, const XBitmap &xbm, PixelLocation loc, uint16_t color)
const XBitmap & xbm
void draw() override
Draw this DisplayElement to the display buffer.
An interface for elements that draw to a display.
DisplayInterface & display
An interface for displays.
virtual void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)=0
Draw a bitmap to the display.
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32
A simple struct representing a pixel with integer coordinates.
Definition Def.hpp:62
A struct containing X Bitmap width, height and data.
Definition XBitmaps.hpp:12