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

◆ toScreenMap()

ScreenMap fl::XYMap::toScreenMap ( ) const

Definition at line 14 of file xymap.cpp.

14 {
15 const uint16_t length = width * height;
16 ScreenMap out(length);
17 for (uint16_t w = 0; w < width; w++) {
18 for (uint16_t h = 0; h < height; h++) {
19 uint16_t index = mapToIndex(w, h);
20 pair_xy_float p = {static_cast<float>(w), static_cast<float>(h)};
21 out.set(index, p);
22 }
23 }
24 return out;
25}
uint16_t width
Definition xymap.h:100
uint16_t mapToIndex(uint16_t x, uint16_t y) const
Definition xymap.cpp:96
uint16_t height
Definition xymap.h:101
pair_xy< float > pair_xy_float
Definition lut.h:24
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:56

References height, mapToIndex(), p, fl::ScreenMap::set(), and width.

+ Here is the call graph for this function: