Control Surface  1.1.1
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
DisplayElement
An interface for elements that draw to a display.
Definition: DisplayElement.hpp:11
NoteBitmapDisplay::xbm
const XBitmap & xbm
Definition: NoteBitmapDisplay.hpp:24
INoteCCValue
Interface for NoteCCValue objects: provides getters for the velocity or controller values.
Definition: NoteCCRange.hpp:13
DisplayInterface
An interface for displays.
Definition: DisplayInterface.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
XBitmaps.hpp
XBitmap
A struct containing X Bitmap width, height and data.
Definition: XBitmaps.hpp:12
NoteBitmapDisplay::note
INoteCCValue & note
Definition: NoteBitmapDisplay.hpp:23
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
XBitmap::width
uint16_t width
Definition: XBitmaps.hpp:15
PixelLocation
A simple struct representing a pixel with integer coordinates.
Definition: Def.hpp:60
XBitmap::height
uint16_t height
Definition: XBitmaps.hpp:16
DisplayElement.hpp
NoteBitmapDisplay::draw
void draw() override
Draw this DisplayElement to the display buffer.
Definition: NoteBitmapDisplay.hpp:17
NoteBitmapDisplay::color
uint16_t color
Definition: NoteBitmapDisplay.hpp:26
XBitmap::bits
const uint8_t * bits
Definition: XBitmaps.hpp:17
INoteCCValue::getValue
virtual uint8_t getValue(uint8_t index) const =0
Get the velocity or controller value for the given index in the range.
DisplayElement::display
DisplayInterface & display
Definition: DisplayElement.hpp:44
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.
NoteBitmapDisplay::y
int16_t y
Definition: NoteBitmapDisplay.hpp:25
NoteBitmapDisplay::NoteBitmapDisplay
NoteBitmapDisplay(DisplayInterface &display, INoteCCValue &note, const XBitmap &xbm, PixelLocation loc, uint16_t color)
Definition: NoteBitmapDisplay.hpp:12
NoteBitmapDisplay::x
int16_t x
Definition: NoteBitmapDisplay.hpp:25
NoteCCRange.hpp