33typedef uint16_t (*XYFunction)(uint16_t x, uint16_t y, uint16_t width,
40 enum XyMapType { kSerpentine = 0, kLineByLine, kFunction, kLookUpTable };
42 static XYMap constructWithUserFunction(uint16_t width, uint16_t height,
43 XYFunction xyFunction,
46 static XYMap constructRectangularGrid(uint16_t width, uint16_t height,
49 static XYMap constructWithLookUpTable(uint16_t width, uint16_t height,
50 const uint16_t *lookUpTable,
55 XYMap(uint16_t width, uint16_t height,
bool is_serpentine =
true,
62 void mapPixels(
const CRGB *input,
CRGB *output)
const;
64 void convertToLookUpTable();
66 void setRectangularGrid();
68 uint16_t operator()(uint16_t x, uint16_t y)
const {
69 return mapToIndex(x, y);
72 uint16_t mapToIndex(uint16_t x, uint16_t y)
const;
74 uint16_t getWidth()
const;
75 uint16_t getHeight()
const;
76 uint16_t getTotal()
const;
77 XyMapType getType()
const;
80 XYMap(uint16_t width, uint16_t height, XyMapType type);
85 XYFunction xyFunction =
nullptr;
86 fl::LUT16Ptr mLookUpTable;