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

◆ operator()()

template<class PIXEL_TYPE>
CPixelView CPixelView< PIXEL_TYPE >::operator() ( int start,
int end )
inline

Access an inclusive subset of the LEDs in this set.

Note
The start point can be greater than end, which will result in a reverse ordering for many functions (useful for mirroring).
Parameters
startthe first element from this set for the new subset
endthe last element for the new subset

Definition at line 157 of file pixelset.h.

157{ if(dir & 0x80) { return CPixelView(leds+len+1, -len-start-1, -len-end-1); } else { return CPixelView(leds, start, end); } }
PIXEL_TYPE *const leds
pointer to the LED data
Definition pixelset.h:115
iterator end()
Makes an iterator instance for the end of the LED set.
Definition pixelset.h:484
const int8_t dir
direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
Definition pixelset.h:112
const int len
length of the LED data, in PIXEL_TYPE units.
Definition pixelset.h:113
CPixelView(const CPixelView &other)
PixelSet copy constructor.
Definition pixelset.h:120
Represents a view/window into a set of LED pixels, providing array-like access and rich color operati...
Definition pixelset.h:110