20 u16 width, u16 height) {
24 return (
y + 1) * width - 1 -
x;
30 u16 width, u16 height) {
61 const u16 *lookUpTable,
93 template <
typename IntType,
106 return (
x >= 0) && (
y >= 0) &&
has((u16)
x, (u16)
y);
XyMapType getType() const
u16 operator()(u16 x, u16 y) const
static XYMap constructWithUserFunction(u16 width, u16 height, XYFunction xyFunction, u16 offset=0)
bool isSerpentineOrLineByLine() const
fl::ScreenMap toScreenMap() const
static XYMap constructSerpentine(u16 width, u16 height, u16 offset=0)
XYMap(const XYMap &other)=default
void mapPixels(const CRGB *input, CRGB *output) const
bool has(int x, int y) const
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0)
void convertToLookUpTable()
bool isRectangularGrid() const
u16 mapToIndex(IntType x, IntType y) const
static XYMap identity(u16 width, u16 height)
static XYMap constructWithLookUpTable(u16 width, u16 height, const u16 *lookUpTable, u16 offset=0)
u16 mapToIndex(const u16 &x, const u16 &y) const
bool has(u16 x, u16 y) const
XYMap(u16 width, u16 height, bool is_serpentine=true, u16 offset=0)
bool isLineByLine() const
bool isSerpentine() const
XYMap & operator=(const XYMap &other)=default
fl::LUT16Ptr mLookUpTable
void setRectangularGrid()
Defines the red, green, and blue (RGB) pixel struct.
UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
#define FASTLED_FORCE_INLINE
Implements the FastLED namespace macros.
FASTLED_FORCE_INLINE u16 xy_line_by_line(u16 x, u16 y, u16 width, u16 height)
u16(* XYFunction)(u16 x, u16 y, u16 width, u16 height)
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
FASTLED_FORCE_INLINE u16 xy_serpentine(u16 x, u16 y, u16 width, u16 height)
typename enable_if< Condition, T >::type enable_if_t
Representation of an RGB pixel (Red, Green, Blue)