26 const CRGB &
at(
int x,
int y)
const {
return (*
this)(
x,
y); }
45 for (
size_t i = 0; i <
mXyMap.getTotal(); ++i) {
56template <
size_t W,
size_t H>
class LedsXY :
public Leds {
61 :
XYMap::constructRectangularGrid(W, H)) {}
const XYMap & xymap() const
Leds(CRGB *leds, uint16_t width, uint16_t height)
void fill(const CRGB &color)
CRGB & operator()(int x, int y)
const CRGB & at(int x, int y) const
Leds & operator=(const Leds &)=default
Leds(const Leds &)=default
LedsXY(bool is_serpentine)
LedsXY(const LedsXY &)=default
void setXyMap(const XYMap &xymap)
void setSerpentine(bool is_serpentine)
LedsXY & operator=(const LedsXY &)=default
static XYMap constructSerpentine(uint16_t width, uint16_t height, uint16_t offset=0)
static XYMap constructRectangularGrid(uint16_t width, uint16_t height, uint16_t offset=0)
Defines the red, green, and blue (RGB) pixel struct.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)