40 for (
int x = 0;
x < 2; ++
x) {
41 for (
int y = 0;
y < 2; ++
y) {
42 uint16_t value =
at(
x,
y);
50 at(0, 0) = {wrap_x(
vec2i16(origin.
x, origin.
y), width), from.
at(0, 0)};
51 at(0, 1) = {wrap_x(
vec2i16(origin.
x, origin.
y + 1), width), from.
at(0, 1)};
52 at(1, 0) = {wrap_x(
vec2i16(origin.
x + 1, origin.
y), width), from.
at(1, 0)};
53 at(1, 1) = {wrap_x(
vec2i16(origin.
x + 1, origin.
y + 1), width),
87 max =
MAX(max,
at(0, 0));
88 max =
MAX(max,
at(0, 1));
89 max =
MAX(max,
at(1, 0));
90 max =
MAX(max,
at(1, 1));
96 for (
int x = 0;
x < 2; ++
x) {
97 for (
int y = 0;
y < 2; ++
y) {
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
Data & at(uint16_t x, uint16_t y)
fl::pair< vec2i16, uint8_t > Data
Tile2x2_u8_wrap()=default
void scale(uint8_t scale)
static Tile2x2_u8 MaxTile(const Tile2x2_u8 &a, const Tile2x2_u8 &b)
static void Rasterize(const Slice< const Tile2x2_u8 > &tiles, XYRasterU8Sparse *output)
rect< int16_t > bounds() const
bounds => [begin_x, end_x) (where end_x is exclusive)
void draw(const CRGB &color, const XYMap &xymap, CRGB *out) const
vec2< int16_t > origin() const
uint8_t & at(int x, int y)
void rasterize(const vec2< int16_t > &pt, uint8_t value)
Defines the red, green, and blue (RGB) pixel struct.
static vec2i16 wrap_x(const vec2i16 &v, const uint16_t width)
static vec2i16 wrap(const vec2i16 &v, const vec2i16 &size)
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)