Class for using NeoPixel matrices with the GFX graphics library.
More...
#include <Adafruit_NeoMatrix.h>
|
| | Adafruit_NeoMatrix (int w, int h, uint8_t pin=6, uint8_t matrixType=NEO_MATRIX_TOP+NEO_MATRIX_LEFT+NEO_MATRIX_ROWS, neoPixelType ledType=NEO_GRB+NEO_KHZ800) |
| | Construct a single (non-tiled) matrix. More...
|
| |
| | Adafruit_NeoMatrix (uint8_t matrixW, uint8_t matrixH, uint8_t tX, uint8_t tY, uint8_t pin=6, uint8_t matrixType=NEO_MATRIX_TOP+NEO_MATRIX_LEFT+NEO_MATRIX_ROWS+NEO_TILE_TOP+NEO_TILE_LEFT+NEO_TILE_ROWS, neoPixelType ledType=NEO_GRB+NEO_KHZ800) |
| | Construct a tiled matrix. More...
|
| |
| void | drawPixel (int16_t x, int16_t y, uint16_t color) |
| | Pixel-drawing function for Adafruit_GFX. More...
|
| |
| void | fillScreen (uint16_t color) |
| | Fill matrix with a single color. More...
|
| |
| void | setPassThruColor (uint32_t c) |
| | Pass-through is a kludge that lets you override the current drawing color with a 'raw' RGB (or RGBW) value that's issued directly to pixel(s), side-stepping the 16-bit color limitation of Adafruit_GFX. This is not without some limitations of its own – for example, it won't work in conjunction with the background color feature when drawing text or bitmaps (you'll just get a solid rect of color), only 'transparent' text/bitmaps. Also, no gamma correction. Remember to UNSET the passthrough color immediately when done with it (call with no value)! More...
|
| |
|
void | setPassThruColor (void) |
| | Stop using pass-through color, return to normal 16-bit color usage.
|
| |
| void | setRemapFunction (uint16_t(*fn)(uint16_t, uint16_t)) |
| | Register a function for mapping X/Y coordinates to absolute pixel indices (for unusual layouts if if NEO_MATRIX_* and NEO_TILE_* settings do not provide sufficient control). More...
|
| |
|
| static uint16_t | Color (uint8_t r, uint8_t g, uint8_t b) |
| | Quantize a 24-bit RGB color value to 16-bit '565' format. More...
|
| |
Class for using NeoPixel matrices with the GFX graphics library.
◆ Adafruit_NeoMatrix() [1/2]
Construct a single (non-tiled) matrix.
- Parameters
-
| w | Matrix width in pixels. |
| h | Matrix height in pixels. |
| pin | Arduino pin number for NeoPixel data out. |
| matrixType | Matrix layout - add together NEO_MATRIX_* values to declare orientation, rotation, etc. |
| ledType | NeoPixel LED type, similar to Adafruit_NeoPixel constructor (e.g. NEO_GRB). |
◆ Adafruit_NeoMatrix() [2/2]
Construct a tiled matrix.
- Parameters
-
| matrixW | Individual sub-matrix (tile) width in pixels. |
| matrixH | Individual sub-matrix (tile) height in pixels. |
| tX | Number of tiles on the X (horizontal) axis. |
| tY | Number of tiles on the Y (vertical) axis. |
| pin | Arduino pin number for NeoPixel data out. |
| matrixType | Tiled matrix layout - add together NEO_MATRIX_* and NEO_TILE_* values to declare orientation, rotation, etc. |
| ledType | NeoPixel LED type, similar to Adafruit_NeoPixel constructor (e.g. NEO_GRB). |
◆ drawPixel()
| void Adafruit_NeoMatrix::drawPixel |
( |
int16_t |
x, |
|
|
int16_t |
y, |
|
|
uint16_t |
color |
|
) |
| |
Pixel-drawing function for Adafruit_GFX.
- Parameters
-
| x | Pixel column (0 = left edge, unless rotation used). |
| y | Pixel row (0 = top edge, unless rotation used). |
| color | Pixel color in 16-bit '565' RGB format. |
◆ fillScreen()
| void Adafruit_NeoMatrix::fillScreen |
( |
uint16_t |
color | ) |
|
Fill matrix with a single color.
- Parameters
-
| color | Pixel color in 16-bit '565' RGB format. |
◆ setPassThruColor()
| void Adafruit_NeoMatrix::setPassThruColor |
( |
uint32_t |
c | ) |
|
Pass-through is a kludge that lets you override the current drawing color with a 'raw' RGB (or RGBW) value that's issued directly to pixel(s), side-stepping the 16-bit color limitation of Adafruit_GFX. This is not without some limitations of its own – for example, it won't work in conjunction with the background color feature when drawing text or bitmaps (you'll just get a solid rect of color), only 'transparent' text/bitmaps. Also, no gamma correction. Remember to UNSET the passthrough color immediately when done with it (call with no value)!
- Parameters
-
| c | Pixel color in packed 32-bit 0RGB or WRGB format. |
◆ setRemapFunction()
| void Adafruit_NeoMatrix::setRemapFunction |
( |
uint16_t(*)(uint16_t, uint16_t) |
fn | ) |
|
Register a function for mapping X/Y coordinates to absolute pixel indices (for unusual layouts if if NEO_MATRIX_* and NEO_TILE_* settings do not provide sufficient control).
- Parameters
-
| fn | Pointer to function that accepts two uint16_t arguments (column and row), returns absolute pixel index. |
◆ Color()
| uint16_t Adafruit_NeoMatrix::Color |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
static |
Quantize a 24-bit RGB color value to 16-bit '565' format.
- Parameters
-
| r | Red component (0 to 255). |
| g | Green component (0 to 255). |
| b | Blue component (0 to 255). |
- Returns
- uint16_t Quantized color for GFX drawing functions.
The documentation for this class was generated from the following files: