45 max =
MAX(max,
at(0, 0));
46 max =
MAX(max,
at(0, 1));
47 max =
MAX(max,
at(1, 0));
48 max =
MAX(max,
at(1, 1));
54 for (
int x = 0;
x < 2; ++
x) {
55 for (
int y = 0;
y < 2; ++
y) {
75 template <
typename XYVisitor>
77 for (uint16_t
x = 0;
x < 2; ++
x) {
78 for (uint16_t
y = 0;
y < 2; ++
y) {
79 uint8_t value =
at(
x,
y);
83 if (
xymap.has(xx, yy)) {
84 int index =
xymap(xx, yy);
85 visitor.draw(
vec2<int>(xx, yy), index, value);
UISlider scale("Scale", 1.0f, 0.0f, 1.0f, 0.01f)
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
void scale(uint8_t scale)
static void Rasterize(const Slice< const Tile2x2_u8 > &tiles, XYRasterU8Sparse *output)
Tile2x2_u8(const Tile2x2_u8 &)=default
static Tile2x2_u8 Max(const Tile2x2_u8 &a, const Tile2x2_u8 &b)
const uint8_t & at(int x, int y) const
uint8_t & operator()(int x, int y)
rect< int > bounds() const
vec2< int > origin() const
Tile2x2_u8(const vec2< int > &origin)
void draw(const CRGB &color, const XYMap &xymap, CRGB *out) const
Tile2x2_u8(Tile2x2_u8 &&)=default
Tile2x2_u8 & operator=(const Tile2x2_u8 &)=default
void draw(const XYMap &xymap, XYVisitor &visitor) const
uint8_t & at(int x, int y)
#define FASTLED_NAMESPACE_END
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)