FastLED 3.9.15
Loading...
Searching...
No Matches
fl::XYMap Class Reference

Detailed Description

#include <xymap.h>

Public Types

enum  XyMapType { kSerpentine = 0 , kLineByLine , kFunction , kLookUpTable }
 

Public Member Functions

 XYMap (const XYMap &other)=default
 
 XYMap (u16 width, u16 height, bool is_serpentine=true, u16 offset=0)
 
void convertToLookUpTable ()
 
u16 getHeight () const
 
u16 getTotal () const
 
XyMapType getType () const
 
u16 getWidth () const
 
bool has (int x, int y) const
 
bool has (u16 x, u16 y) const
 
bool isFunction () const
 
bool isLineByLine () const
 
bool isLUT () const
 
bool isRectangularGrid () const
 
bool isSerpentine () const
 
bool isSerpentineOrLineByLine () const
 
void mapPixels (const CRGB *input, CRGB *output) const
 
u16 mapToIndex (const u16 &x, const u16 &y) const
 
template<typename IntType, typename = fl::enable_if_t<!fl::is_integral<IntType>::value>>
u16 mapToIndex (IntType x, IntType y) const
 
u16 operator() (u16 x, u16 y) const
 
XYMapoperator= (const XYMap &other)=default
 
void setRectangularGrid ()
 
fl::ScreenMap toScreenMap () const
 

Static Public Member Functions

static XYMap constructRectangularGrid (u16 width, u16 height, u16 offset=0)
 
static XYMap constructSerpentine (u16 width, u16 height, u16 offset=0)
 
static XYMap constructWithLookUpTable (u16 width, u16 height, const u16 *lookUpTable, u16 offset=0)
 
static XYMap constructWithUserFunction (u16 width, u16 height, XYFunction xyFunction, u16 offset=0)
 
static XYMap identity (u16 width, u16 height)
 

Private Member Functions

 XYMap (u16 width, u16 height, XyMapType type)
 

Private Attributes

u16 height
 
fl::LUT16Ptr mLookUpTable
 
u16 mOffset = 0
 
XyMapType type
 
u16 width
 
XYFunction xyFunction = nullptr
 

The documentation for this class was generated from the following files: