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

◆ drawGradient()

void fl::XYPath::drawGradient ( const Gradient & gradient,
float from,
float to,
Leds * leds,
int steps = -1 )

Definition at line 280 of file xypath.cpp.

281 {
282 XYRasterU8Sparse &raster = get_tls_raster();
283 raster.clear();
284 steps = steps > 0 ? steps : calculateSteps(from, to);
285 rasterize(from, to, steps, raster);
286 raster.drawGradient(gradient, leds->xymap(), leds->rgb());
287}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
XYRaster raster(WIDTH, HEIGHT)
int calculateSteps(float from, float to)
Definition xypath.cpp:289
void rasterize(float from, float to, int steps, XYRasterU8Sparse &raster, AlphaFunction *optional_alpha_gen=nullptr)
Definition xypath.cpp:60
UISlider steps("Steps", 100.0f, 1.0f, 200.0f, 1.0f)
XYRasterU8Sparse & get_tls_raster()
Definition xypath.cpp:27

References calculateSteps(), leds, raster, rasterize(), and steps().

+ Here is the call graph for this function: