FastLED
3.9.3
Loading...
Searching...
No Matches
xymap.cpp
1
2
#include <stdint.h>
3
#include <string.h>
4
5
#include "force_inline.h"
6
#include "namespace.h"
7
#include "xymap.h"
8
#include "screenmap.h"
9
10
FASTLED_NAMESPACE_BEGIN
11
12
ScreenMap
XYMap::toScreenMap()
const
{
13
const
uint16_t length = width * height;
14
ScreenMap
out(length);
15
for
(uint16_t w = 0; w < width; w++) {
16
for
(uint16_t h = 0; h < height; h++) {
17
uint16_t index = mapToIndex(w, h);
18
pair_xy_float
p = {
19
static_cast<
float
>
(w),
20
static_cast<
float
>
(h)
21
};
22
out.set(index, p);
23
}
24
}
25
return
out;
26
}
27
28
FASTLED_NAMESPACE_END
ScreenMap
Definition
screenmap.h:29
pair_xy
Definition
lut.h:17
src
xymap.cpp
Generated on Thu Nov 14 2024 00:00:34 for FastLED by
1.11.0