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

◆ operator[]()

template<class PIXEL_TYPE>
PIXEL_TYPE & CPixelView< PIXEL_TYPE >::operator[] ( int x) const
inline

Access a single element in this set, just like an array operator.

Definition at line 150 of file pixelset.h.

150{ if(dir & 0x80) { return leds[-x]; } else { return leds[x]; } }
PIXEL_TYPE *const leds
pointer to the LED data
Definition pixelset.h:115
const int8_t dir
direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
Definition pixelset.h:112
Represents a view/window into a set of LED pixels, providing array-like access and rich color operati...
Definition pixelset.h:110