15#define FUNCTION_FILL_RAINBOW(a,b,c,d) fl::fill_rainbow(a,b,c,d)
16#define FUNCTION_NAPPLY_GAMMA(a,b,c) fl::napplyGamma_video(a,b,c)
17#define FUNCTION_NAPPLY_GAMMA_RGB(a,b,c,d,e) fl::napplyGamma_video(a,b,c,d,e)
18#define FUNCTION_BLUR1D(a,b,c) fl::blur1d(a,b,c)
19#define FUNCTION_FILL_GRADIENT(a,b,c,d,e) fl::fill_gradient(a,b,c,d,e)
20#define FUNCTION_FILL_GRADIENT3(a,b,c,d,e,f) fl::fill_gradient(a,b,c,d,e,f)
21#define FUNCTION_FILL_GRADIENT4(a,b,c,d,e,f,g) fl::fill_gradient(a,b,c,d,e,f,g)
22#define FUNCTION_NBLEND(a,b,c) fl::nblend(a,b,c)
23#define FUNCTION_FILL_GRADIENT_RGB(a,b,c,d) fl::fill_gradient_RGB(a,b,c,d)
24#define FUNCTION_FILL_GRADIENT_RGB3(a,b,c,d,e) fl::fill_gradient_RGB(a,b,c,d,e)
25#define FUNCTION_FILL_GRADIENT_RGB4(a,b,c,d,e,f) fl::fill_gradient_RGB(a,b,c,d,e,f)
28template<
class PIXEL_TYPE>
102template<
class PIXEL_TYPE>
165 for(
iterator pixel =
begin(), _end =
end(); pixel != _end; ++pixel) { (*pixel) = color; }
184 for(
iterator pixel =
begin(), rhspixel = rhs.begin(), _end =
end(), rhs_end = rhs.end(); (pixel != _end) && (rhspixel != rhs_end); ++pixel, ++rhspixel) {
185 (*pixel) = (*rhspixel);
275 inline operator bool()
FL_NO_EXCEPT {
for(
iterator pixel =
begin(), _end =
end(); pixel != _end; ++pixel) {
if((*pixel))
return true; }
return false; }
478 typedef pixelset_iterator_base<PIXEL_TYPE>
iterator;
507 using CPixelView::operator=;
519#undef FUNCTION_FILL_RAINBOW
520#undef FUNCTION_NAPPLY_GAMMA
521#undef FUNCTION_NAPPLY_GAMMA_RGB
522#undef FUNCTION_BLUR1D
523#undef FUNCTION_FILL_GRADIENT
524#undef FUNCTION_FILL_GRADIENT3
525#undef FUNCTION_FILL_GRADIENT4
526#undef FUNCTION_NBLEND
527#undef FUNCTION_FILL_GRADIENT_RGB
528#undef FUNCTION_FILL_GRADIENT_RGB3
529#undef FUNCTION_FILL_GRADIENT_RGB4
FASTLED_FORCE_INLINE pixelset_iterator_base operator++(int) FL_NO_EXCEPT
Increment LED pointer in data direction.
FASTLED_FORCE_INLINE PIXEL_TYPE & operator*() const FL_NO_EXCEPT
Dereference operator, to get underlying pointer to the LEDs.
FASTLED_FORCE_INLINE pixelset_iterator_base(T *_leds, const char _dir) FL_NO_EXCEPT
Base constructor.
FASTLED_FORCE_INLINE pixelset_iterator_base & operator++() FL_NO_EXCEPT
Increment LED pointer in data direction.
FASTLED_FORCE_INLINE pixelset_iterator_base(const pixelset_iterator_base &rhs) FL_NO_EXCEPT
Copy constructor.
FASTLED_FORCE_INLINE bool operator!=(const pixelset_iterator_base &other) const FL_NO_EXCEPT
Check if iterator is not at the same position.
FASTLED_FORCE_INLINE bool operator==(const pixelset_iterator_base &other) const FL_NO_EXCEPT
Check if iterator is at the same position.
CPixelView(const CPixelView &other) FL_NO_EXCEPT
PixelSet copy constructor.
CPixelView & operator&=(const PIXEL_TYPE &rhs) FL_NO_EXCEPT
Apply the PIXEL_TYPE &= operator to every pixel in this set with the given PIXEL_TYPE value.
CPixelView & nblend(const CPixelView &rhs, fract8 amountOfOverlay) FL_NO_EXCEPT
Destructively blend another set of LEDs into this one.
iterator end() FL_NO_EXCEPT
bool operator!=(const CPixelView &rhs) const FL_NO_EXCEPT
Do these sets point to different things? Note that this is different from the contents of the set bei...
CPixelView & blur1d(fract8 blur_amount) FL_NO_EXCEPT
One-dimensional blur filter.
iterator end() const FL_NO_EXCEPT
Makes an iterator instance for the end of the LED set, const qualified.
CPixelView & operator=(const PIXEL_TYPE &color) FL_NO_EXCEPT
Assign the passed in color to all elements in this set.
CPixelView & operator++(int DUMMY_ARG) FL_NO_EXCEPT
Increment every pixel value in this set.
CPixelView operator-() FL_NO_EXCEPT
Return the reverse ordering of this set.
CPixelView & fill_gradient(const CHSV &startcolor, const CHSV &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
Fill all of the LEDs with a smooth HSV gradient between two HSV colors.
CPixelView & fill_gradient_RGB(const PIXEL_TYPE &c1, const PIXEL_TYPE &c2, const PIXEL_TYPE &c3, const PIXEL_TYPE &c4) FL_NO_EXCEPT
Fill all of the LEDs with a smooth RGB gradient between four RGB colors.
PIXEL_TYPE & operator[](int x) const FL_NO_EXCEPT
Access a single element in this set, just like an array operator.
CPixelView & operator|=(const PIXEL_TYPE &rhs) FL_NO_EXCEPT
Apply the PIXEL_TYPE |= operator to every pixel in this set with the given PIXEL_TYPE value.
CPixelView & addToRGB(fl::u8 inc) FL_NO_EXCEPT
Add the passed in value to all channels for all of the pixels in this set.
int size() const FL_NO_EXCEPT
Get the size of this set.
CPixelView & nscale8(fl::u8 scaledown) FL_NO_EXCEPT
Scale every LED by the given scale.
const_iterator cend() const FL_NO_EXCEPT
Makes a const iterator instance for the end of the LED set, const qualified.
CPixelView & fadeToBlackBy(fl::u8 fade) FL_NO_EXCEPT
Fade every LED down by the given scale.
CPixelView & operator|=(fl::u8 d) FL_NO_EXCEPT
Apply the PIXEL_TYPE |= operator to every pixel in this set.
bool operator==(const CPixelView &rhs) const FL_NO_EXCEPT
Do these sets point to the same thing? Note that this is different from the contents of the set being...
bool reversed() FL_NO_EXCEPT
Whether or not this set goes backwards.
CPixelView & nscale8(PIXEL_TYPE &scaledown) FL_NO_EXCEPT
Scale every LED by the given scale.
CPixelView & operator=(const CPixelView &rhs) FL_NO_EXCEPT
Copy the contents of the passed-in set to our set.
CPixelView & operator%=(fl::u8 scaledown) FL_NO_EXCEPT
Scale down every LED by the given scale.
CPixelView & fadeLightBy(fl::u8 fadefactor) FL_NO_EXCEPT
Fade every LED down by the given scale.
CPixelView & nblend(const PIXEL_TYPE &overlay, fract8 amountOfOverlay) FL_NO_EXCEPT
Destructively modifies all LEDs, blending in a given fraction of an overlay color.
CPixelView & napplyGamma_video(float gammaR, float gammaG, float gammaB) FL_NO_EXCEPT
Destructively applies a gamma adjustment to all LEDs.
CPixelView & operator--(int DUMMY_ARG) FL_NO_EXCEPT
Decrement every pixel value in this set.
CPixelView & subFromRGB(fl::u8 inc) FL_NO_EXCEPT
Subtract the passed in value from all channels for all of the pixels in this set.
CPixelView & operator-=(CPixelView &rhs) FL_NO_EXCEPT
Subtract every pixel in the other set from this set.
iterator begin() FL_NO_EXCEPT
Makes an iterator instance for the start of the LED set.
CPixelView(PIXEL_TYPE *_leds, int _len) FL_NO_EXCEPT
PixelSet constructor for a pixel set starting at the given PIXEL_TYPE* and going for _len leds.
CPixelView & operator/=(fl::u8 d) FL_NO_EXCEPT
Divide every LED by the given value.
CPixelView & nscale8(CPixelView &rhs) FL_NO_EXCEPT
Scale every LED in this set by every led in the other set.
pixelset_iterator_base< CRGB > iterator
void dump() const FL_NO_EXCEPT
Print debug data to serial, disabled for release.
CPixelView & fill_solid(const CHSV &color) FL_NO_EXCEPT
Fill all of the LEDs with a solid color.
CPixelView & fill_gradient(const CHSV &c1, const CHSV &c2, const CHSV &c3, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
Fill all of the LEDs with a smooth HSV gradient between three HSV colors.
CPixelView & fill_gradient_RGB(const PIXEL_TYPE &startcolor, const PIXEL_TYPE &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
Fill all of the LEDs with a smooth RGB gradient between two RGB colors.
const_iterator cbegin() const FL_NO_EXCEPT
Makes a const iterator instance for the start of the LED set, const qualified.
iterator begin() const FL_NO_EXCEPT
Makes an iterator instance for the start of the LED set, const qualified.
CPixelView & operator++() FL_NO_EXCEPT
Increment every pixel value in this set.
CPixelView & nscale8_video(fl::u8 scaledown) FL_NO_EXCEPT
Scale every LED by the given scale.
CPixelView & operator>>=(fl::u8 d) FL_NO_EXCEPT
Shift every LED in this set right by the given number of bits.
CPixelView & napplyGamma_video(float gamma) FL_NO_EXCEPT
Destructively applies a gamma adjustment to all LEDs.
pixelset_iterator_base< const CRGB > const_iterator
CPixelView & operator|=(const CPixelView &rhs) FL_NO_EXCEPT
Apply the PIXEL_TYPE |= operator to every pixel in this set with every pixel in the passed in set.
CPixelView operator()(int start, int end) FL_NO_EXCEPT
Access an inclusive subset of the LEDs in this set.
CPixelView & fill_gradient(const CHSV &c1, const CHSV &c2, const CHSV &c3, const CHSV &c4, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
Fill all of the LEDs with a smooth HSV gradient between four HSV colors.
CPixelView & fill_gradient_RGB(const PIXEL_TYPE &c1, const PIXEL_TYPE &c2, const PIXEL_TYPE &c3) FL_NO_EXCEPT
Fill all of the LEDs with a smooth RGB gradient between three RGB colors.
CPixelView & operator+=(CPixelView &rhs) FL_NO_EXCEPT
Add every pixel in the other set to this set.
CPixelView & fill_solid(const PIXEL_TYPE &color) FL_NO_EXCEPT
Fill all of the LEDs with a solid color.
CPixelView & fill_rainbow(fl::u8 initialhue, fl::u8 deltahue=5) FL_NO_EXCEPT
Fill all of the LEDs with a rainbow of colors.
CPixelView & operator&=(fl::u8 d) FL_NO_EXCEPT
Apply the PIXEL_TYPE &= operator to every pixel in this set with the passed in value.
CPixelView & operator--() FL_NO_EXCEPT
Decrement every pixel value in this set.
CPixelView(PIXEL_TYPE *_leds, int _start, int _end) FL_NO_EXCEPT
PixelSet constructor for the given set of LEDs, with start and end boundaries.
CPixelView & operator&=(const CPixelView &rhs) FL_NO_EXCEPT
Apply the PIXEL_TYPE &= operator to every pixel in this set with every pixel in the passed in set.
CPixelView & operator*=(fl::u8 d) FL_NO_EXCEPT
Multiply every LED in this set by the given value.
Represents a view/window into a set of LED pixels, providing array-like access and rich color operati...
CRGB rawleds[SIZE]
the LED data
CRGB * get() FL_NO_EXCEPT
const CRGB * get() const FL_NO_EXCEPT
size_t size() const FL_NO_EXCEPT
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
Utility functions for color fill, palettes, blending, and more.
Internal FastLED header for implementation files.
FASTLED_FORCE_INLINE CRGB * operator+(const CRGBSet &pixels, int offset) FL_NO_EXCEPT
Retrieve a pointer to a CRGB array, using a CRGBSet and an LED offset.
u8 fract8
Fixed-Point Fractional Types.
TGradientDirectionCode
Hue direction for calculating fill gradients.
@ SHORTEST_HUES
Hue goes whichever way is shortest.
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NO_EXCEPT
#define FUNCTION_NBLEND(a, b, c)
#define FUNCTION_FILL_GRADIENT3(a, b, c, d, e, f)
#define FUNCTION_FILL_GRADIENT_RGB3(a, b, c, d, e)
#define FUNCTION_FILL_GRADIENT4(a, b, c, d, e, f, g)
#define FUNCTION_FILL_GRADIENT(a, b, c, d, e)
#define FUNCTION_FILL_GRADIENT_RGB(a, b, c, d)
#define FUNCTION_FILL_GRADIENT_RGB4(a, b, c, d, e, f)
#define FUNCTION_BLUR1D(a, b, c)
#define FUNCTION_NAPPLY_GAMMA_RGB(a, b, c, d, e)
#define FUNCTION_NAPPLY_GAMMA(a, b, c)
CPixelView< CRGB > CRGBSet
CPixelView specialized for CRGB pixel arrays - the most commonly used pixel view type.
#define FUNCTION_FILL_RAINBOW(a, b, c, d)
#define FASTLED_FORCE_INLINE
#define FASTLED_UNUSED(x)