FastLED 3.9.15
Loading...
Searching...
No Matches

◆ draw() [2/2]

template<typename XYVisitor>
void fl::XYRasterU8Sparse::draw ( const XYMap & xymap,
XYVisitor & visitor )
inline

Definition at line 148 of file raster_sparse.h.

148 {
149 for (const auto &it : mSparseGrid) {
150 auto pt = it.first;
151 if (!xymap.has(pt.x, pt.y)) {
152 continue;
153 }
154 uint32_t index = xymap(pt.x, pt.y);
155 uint8_t value = it.second;
156 if (value > 0) { // Something wrote here.
157 visitor.draw(pt, index, value);
158 }
159 }
160 }
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
bool has(uint16_t x, uint16_t y) const
Definition xymap.h:95
HashMapLarge mSparseGrid

References mSparseGrid, and xymap.