Implement a set of .clear() methods

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/365/head
Gergely Nagy 8 years ago
parent e48d23c0ea
commit ca1cd7c590

@ -55,6 +55,13 @@ The plugin provides the `AlphaSquare` object, which has the following methods:
> Almost the same as the previous function, but instead of a key, it expects a
> 4x4 bitmap.
### `.clear(key)`, `.clear(symbol)`
### `.clear(key, col)`, `.clear(symbol, col)`
### `.clear(key, col, row)`, `.clear(symbol, col, row)`
> Just like the `.display()` counterparts, except these clear the symbol, by
> turning the LED pixels it is made up from, off.
### `.color`
> The color to use to draw the pixels.

@ -49,6 +49,14 @@ namespace KaleidoscopePlugins {
static void display (uint16_t symbol) { display (symbol, 0, 2); };
static void display (uint16_t symbol, uint8_t col) { display (symbol, 0, col); };
static void clear (Key key, uint8_t row, uint8_t col) { display (key, row, col, {0, 0, 0}); };
static void clear (Key key, uint8_t col) { clear (key, 0, col); };
static void clear (Key key) { clear (key, 0, 2); };
static void clear (uint16_t symbol, uint8_t row, uint8_t col) { display (symbol, row, col, {0, 0, 0}); };
static void clear (uint16_t symbol, uint8_t col) { clear (symbol, 0, col); };
static void clear (uint16_t symbol) { clear (symbol, 0, 2); };
static cRGB color;
};
};

Loading…
Cancel
Save