MCPcopy Create free account
hub / github.com/FastLED/FastLED / draw

Method draw

src/fl/gfx/raster_sparse.h:150–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 // pixels that are within the bounds of the XYMap.
149 template <typename XYVisitor>
150 void draw(const XYMap &xymap, XYVisitor &visitor) {
151 for (const auto &it : mSparseGrid) {
152 auto pt = it.first;
153 if (!xymap.has(pt.x, pt.y)) {
154 continue;
155 }
156 u32 index = xymap(pt.x, pt.y);
157 u8 value = it.second;
158 if (value > 0) { // Something wrote here.
159 visitor.draw(pt, index, value);
160 }
161 }
162 }
163
164 static const int kMaxCacheSize = 8; // Max size for tiny cache.
165

Callers 1

drawMethod · 0.45

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected