32 template <
typename T>
void accept(
const T &obj) {
54 for (fl::size i = 0; i <
n; ++i) {
60 for (fl::size i = 0; i <
n; ++i) {
66 for (fl::size i = 0; i <
n; ++i) {
72 for (fl::size i = 0; i <
n; ++i) {
77 template <
typename T>
void accept(
const T &obj) {
91 Visitor visitor(index);
93 return visitor.return_val;
112 if (
this != &other) {
119 VisitorFill visitor(input, output);
124 Visitor visitor(index);
126 return visitor.return_val;
130 VisitorFill visitor(input, output);
137 Copy(
Gradient &owner) : mOwner(owner) {}
138 void accept(
const CRGBPalette16 &
palette) { mOwner.set(&
palette); }
139 void accept(
const CRGBPalette32 &
palette) { mOwner.set(&
palette); }
140 void accept(
const CRGBPalette256 &
palette) { mOwner.set(&
palette); }
144 Copy copy_to_self(*
this);
UINumberField palette("Palette", 0, 0, 2)
void set(const CRGBPalette16 *palette)
fl::function< CRGB(u8 index)> GradientFunction
void fill(span< const u8 > input, span< CRGB > output) const
CRGB colorAt(u8 index) const
Gradient & operator=(const Gradient &other)
Gradient() FL_NOEXCEPT=default
void fill(span< const u8 > input, span< CRGB > output) const
CRGB colorAt(u8 index) const
GradientVariant & getVariant()
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
CRGB ColorFromPaletteExtended(const CRGBPalette32 &pal, fl::u16 index, fl::u8 brightness, TBlendType blendType)
Utility functions for color fill, palettes, blending, and more.
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Base definition for an LED controller.
Representation of an 8-bit RGB pixel (Red, Green, Blue)
void accept(const CRGBPalette32 *palette)
void accept(const Gradient::GradientFunction &func)
void accept(const CRGBPalette16 *palette)
void accept(const CRGBPalette256 *palette)
void accept(const T &obj)
void accept(const CRGBPalette16 *palette)
void accept(const T &obj)
void accept(const Gradient::GradientFunction &func)
void accept(const CRGBPalette256 *palette)
void accept(const CRGBPalette32 *palette)
VisitorFill(span< const u8 > indices, span< CRGB > output)