31 template <
typename T>
void accept(
const T &obj) {
53 for (fl::size i = 0; i <
n; ++i) {
59 for (fl::size i = 0; i <
n; ++i) {
65 for (fl::size i = 0; i <
n; ++i) {
71 for (fl::size i = 0; i <
n; ++i) {
76 template <
typename T>
void accept(
const T &obj) {
90 Visitor visitor(index);
92 return visitor.return_val;
111 if (
this != &other) {
118 VisitorFill visitor(input, output);
123 Visitor visitor(index);
125 return visitor.return_val;
129 VisitorFill visitor(input, output);
136 Copy(
Gradient &owner) : mOwner(owner) {}
137 void accept(
const CRGBPalette16 &
palette) { mOwner.set(&
palette); }
138 void accept(
const CRGBPalette32 &
palette) { mOwner.set(&
palette); }
139 void accept(
const CRGBPalette256 &
palette) { mOwner.set(&
palette); }
143 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)
void fill(span< const u8 > input, span< CRGB > output) const
CRGB colorAt(u8 index) const
GradientVariant & variant()
void visit(Visitor &visitor)
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.
constexpr remove_reference< T >::type && move(T &&t) noexcept
Representation of an RGB pixel (Red, Green, Blue)
void accept(const CRGBPalette16 *palette)
void accept(const Gradient::GradientFunction &func)
void accept(const CRGBPalette256 *palette)
void accept(const CRGBPalette32 *palette)
void accept(const T &obj)
void accept(const CRGBPalette256 *palette)
void accept(const Gradient::GradientFunction &func)
void accept(const CRGBPalette16 *palette)
void accept(const T &obj)
void accept(const CRGBPalette32 *palette)
VisitorFill(span< const u8 > indices, span< CRGB > output)