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

Method draw

src/fl/gfx/raster_sparse.h:327–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325 // pixels that are within the bounds of the XYMap.
326 template <typename XYVisitor>
327 void draw(const XYMap &xymap, XYVisitor &visitor) {
328 for (const auto &it : mSparseGrid) {
329 auto pt = it.first;
330 if (!xymap.has(pt.x, pt.y)) {
331 continue;
332 }
333 u32 index = xymap(pt.x, pt.y);
334 const CRGB &color = it.second;
335 // Only draw non-black pixels (since black represents "no data")
336 if (color.r != 0 || color.g != 0 || color.b != 0) {
337 visitor.draw(pt, index, color);
338 }
339 }
340 }
341
342 static const int kMaxCacheSize = 8; // Max size for tiny cache.
343

Callers

nothing calls this directly

Calls 2

hasMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected