This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
NoteBitmapDisplay.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 
8 
11  public:
13  const XBitmap &xbm, PixelLocation loc, uint16_t color)
14  : DisplayElement(display), note(note), xbm(xbm), x(loc.x), y(loc.y),
15  color(color) {}
16 
17  void draw() override {
18  if (note.getValue())
20  }
21 
22  private:
24  const XBitmap &xbm;
25  int16_t x, y;
26  uint16_t color;
27 };
28 
NoteBitmapDisplay
A class that displays a bitmap depending on the state of a MIDINote.
Definition: NoteBitmapDisplay.hpp:10
XBitmap::bits
const uint8_t * bits
Definition: XBitmaps.hpp:17
DisplayElement
An interface for elements that draw to a display.
Definition: DisplayElement.hpp:11
NoteBitmapDisplay::y
int16_t y
Definition: NoteBitmapDisplay.hpp:25
XBitmap::width
uint16_t width
Definition: XBitmaps.hpp:15
INoteCCValue
Definition: NoteCCRange.hpp:9
DisplayInterface
An interface for displays.
Definition: DisplayInterface.hpp:14
NoteBitmapDisplay::draw
void draw() override
Draw this DisplayElement to the display buffer.
Definition: NoteBitmapDisplay.hpp:17
NoteBitmapDisplay::x
int16_t x
Definition: NoteBitmapDisplay.hpp:25
NoteBitmapDisplay::color
uint16_t color
Definition: NoteBitmapDisplay.hpp:26
XBitmaps.hpp
XBitmap
A struct containing X Bitmap width, height and data.
Definition: XBitmaps.hpp:12
XBitmap::height
uint16_t height
Definition: XBitmaps.hpp:16
PixelLocation
A simple struct representing a pixel with integer coordinates.
Definition: Def.hpp:74
NoteBitmapDisplay::note
INoteCCValue & note
Definition: NoteBitmapDisplay.hpp:23
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
DisplayElement.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
NoteBitmapDisplay::xbm
const XBitmap & xbm
Definition: NoteBitmapDisplay.hpp:24
DisplayElement::display
DisplayInterface & display
Definition: DisplayElement.hpp:44
NoteBitmapDisplay::NoteBitmapDisplay
NoteBitmapDisplay(DisplayInterface &display, INoteCCValue &note, const XBitmap &xbm, PixelLocation loc, uint16_t color)
Definition: NoteBitmapDisplay.hpp:12
INoteCCValue::getValue
virtual uint8_t getValue(uint8_t index) const =0
DisplayInterface::drawXBitmap
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.
NoteCCRange.hpp