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

Method toScreenMap

src/fl/math/xymap.cpp.hpp:12–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace fl {
11
12ScreenMap XYMap::toScreenMap() const {
13 const u16 length = width * height;
14 ScreenMap out(length);
15 for (u16 w = 0; w < width; w++) {
16 for (u16 h = 0; h < height; h++) {
17 u16 index = mapToIndex(w, h);
18 vec2f p = {static_cast<float>(w), static_cast<float>(h)};
19 out.set(index, p);
20 }
21 }
22 // Store a shared_ptr to this XYMap so it can be used for encoding
23 out.setSourceXYMap(fl::make_shared<XYMap>(*this));
24 return out;
25}
26
27XYMap XYMap::constructWithUserFunction(u16 width, u16 height,
28 XYFunction xyFunction, u16 offset) {

Callers 15

CLEDControllerClass · 0.45
channel.cpp.hppFile · 0.45
FL_TEST_FILEFunction · 0.45
xymap.cppFile · 0.45
setupFunction · 0.45
wavefx_setupFunction · 0.45
setupFunction · 0.45
setupFunction · 0.45
setupFunction · 0.45
setupFunction · 0.45
setupFunction · 0.45
setupFunction · 0.45

Calls 2

setSourceXYMapMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected