17#ifndef FASTLED_RASTER_SPARSE_INLINED_COUNT
18#define FASTLED_RASTER_SPARSE_INLINED_COUNT 128
108 bool min_x_set =
false;
110 bool min_y_set =
false;
112 bool max_x_set =
false;
114 bool max_y_set =
false;
117 if (!min_x_set || pt.
x < min_x) {
121 if (!min_y_set || pt.
y < min_y) {
125 if (!max_x_set || pt.
x > max_x) {
129 if (!max_y_set || pt.
y > max_y) {
134 return rect<u16>(min_x, min_y, max_x + 1, max_y + 1);
149 template <
typename XYVisitor>
153 if (!
xymap.has(pt.x, pt.y)) {
156 u32 index =
xymap(pt.x, pt.y);
159 visitor.draw(pt, index,
value);
170 u8 **cached =
mCache.find_value(pt);
273 if (val !=
nullptr) {
288 bool min_x_set =
false;
290 bool min_y_set =
false;
292 bool max_x_set =
false;
294 bool max_y_set =
false;
297 if (!min_x_set || pt.
x < min_x) {
301 if (!min_y_set || pt.
y < min_y) {
305 if (!max_x_set || pt.
x > max_x) {
309 if (!max_y_set || pt.
y > max_y) {
314 return rect<u16>(min_x, min_y, max_x + 1, max_y + 1);
326 template <
typename XYVisitor>
330 if (!
xymap.has(pt.x, pt.y)) {
333 u32 index =
xymap(pt.x, pt.y);
337 visitor.draw(pt, index,
color);
iterator begin() FL_NO_EXCEPT
fl::rect< u16 > mAbsoluteBounds
fl::unordered_map< vec2< u16 >, CRGB >::iterator iterator
XYRasterSparse_RGB8 & clear() FL_NO_EXCEPT
u16 width() const FL_NO_EXCEPT
XYRasterSparse_RGB8() FL_NO_EXCEPT=default
unordered_map< vec2< u16 >, CRGB *, FastHashKey, EqualToKey, kMaxCacheSize > mCache
bool empty() const FL_NO_EXCEPT
XYRasterSparse_RGB8 & reset() FL_NO_EXCEPT
const_iterator end() const FL_NO_EXCEPT
rect< u16 > bounds_pixels() const FL_NO_EXCEPT
XYRasterSparse_RGB8(const XYRasterSparse_RGB8 &) FL_NO_EXCEPT=default
const_iterator begin() const FL_NO_EXCEPT
void setBounds(const rect< u16 > &bounds) FL_NO_EXCEPT
void setSize(u16 width, u16 height) FL_NO_EXCEPT
static const int kMaxCacheSize
fl::unordered_map< vec2< u16 >, CRGB >::const_iterator const_iterator
u16 height() const FL_NO_EXCEPT
XYRasterSparse_RGB8 & operator=(XYRasterSparse_RGB8 &&) FL_NO_EXCEPT=default
void draw(const XYMap &xymap, XYVisitor &visitor) FL_NO_EXCEPT
void draw(const XYMap &xymap, fl::span< CRGB > out) FL_NO_EXCEPT
EqualTo< Key > EqualToKey
pair< bool, CRGB > at(u16 x, u16 y) const FL_NO_EXCEPT
void write(const vec2< u16 > &pt, const CRGB &color) FL_NO_EXCEPT
rect< u16 > bounds() const FL_NO_EXCEPT
fl::unordered_map< Key, Value, HashKey, EqualToKey, FASTLED_HASHMAP_INLINED_COUNT > HashMapLarge
fl::size size() const FL_NO_EXCEPT
FastHash< Key > FastHashKey
void rasterize(const vec2< u16 > &pt, const CRGB &color) FL_NO_EXCEPT
iterator end() FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
void rasterize(const Tile2x2_u8 &tile) FL_NO_EXCEPT
XYRasterU8Sparse & operator=(XYRasterU8Sparse &&) FL_NO_EXCEPT=default
pair< bool, u8 > at(u16 x, u16 y) const FL_NO_EXCEPT
rect< u16 > bounds() const FL_NO_EXCEPT
fl::unordered_map< vec2< u16 >, u8 >::iterator iterator
void rasterize_internal(const Tile2x2_u8 &tile, const rect< u16 > *optional_bounds=nullptr) FL_NO_EXCEPT
static const int kMaxCacheSize
iterator begin() FL_NO_EXCEPT
fl::rect< u16 > mAbsoluteBounds
void write(const vec2< u16 > &pt, u8 value) FL_NO_EXCEPT
EqualTo< Key > EqualToKey
XYRasterU8Sparse & reset() FL_NO_EXCEPT
fl::unordered_map< vec2< u16 >, u8 >::const_iterator const_iterator
const_iterator end() const FL_NO_EXCEPT
iterator end() FL_NO_EXCEPT
XYRasterU8Sparse(const XYRasterU8Sparse &) FL_NO_EXCEPT=default
const_iterator begin() const FL_NO_EXCEPT
u16 width() const FL_NO_EXCEPT
bool empty() const FL_NO_EXCEPT
rect< u16 > bounds_pixels() const FL_NO_EXCEPT
void draw(const CRGB &color, const XYMap &xymap, fl::span< CRGB > out) FL_NO_EXCEPT
FastHash< Key > FastHashKey
void draw(const XYMap &xymap, XYVisitor &visitor) FL_NO_EXCEPT
XYRasterU8Sparse & clear() FL_NO_EXCEPT
XYRasterU8Sparse() FL_NO_EXCEPT=default
void rasterize(const vec2< u16 > &pt, u8 value) FL_NO_EXCEPT
fl::unordered_map< Key, Value, HashKey, EqualToKey, FASTLED_HASHMAP_INLINED_COUNT > HashMapLarge
void setBounds(const rect< u16 > &bounds) FL_NO_EXCEPT
void drawGradient(const Gradient &gradient, const XYMap &xymap, fl::span< CRGB > out) FL_NO_EXCEPT
unordered_map< vec2< u16 >, u8 *, FastHashKey, EqualToKey, kMaxCacheSize > mCache
void setSize(u16 width, u16 height) FL_NO_EXCEPT
u16 height() const FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
constexpr int type_rank< T >::value
XYRasterSparse_RGB8 XYRasterSparse_CRGB
Base definition for an LED controller.
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Representation of an 8-bit RGB pixel (Red, Green, Blue)
u16 width() const FL_NO_EXCEPT
u16 height() const FL_NO_EXCEPT
#define FASTLED_HASHMAP_INLINED_COUNT