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 114 of file pixelset.h.

114{ 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:72
iterator end()
Makes an iterator instance for the end of the LED set.
Definition pixelset.h:441
const int8_t dir
direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
Definition pixelset.h:69
const int len
length of the LED data, in PIXEL_TYPE units.
Definition pixelset.h:70
CPixelView(const CPixelView &other)
PixelSet copy constructor.
Definition pixelset.h:77
Represents a set of LED objects.
Definition pixelset.h:67