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

◆ draw()

void fl::FxLayer::draw ( fl::u32 now)

Definition at line 19 of file fx_layer.cpp.

19 {
20 // assert(fx);
21 if (!frame) {
22 frame = fl::make_shared<Frame>(fx->getNumLeds());
23 }
24
25 if (!running) {
26 // Clear the frame
27 fl::memfill((uint8_t*)frame->rgb(), 0, frame->size() * sizeof(CRGB));
28 fx->resume(now);
29 running = true;
30 }
31 Fx::DrawContext context = {now, frame->rgb()};
32 fx->draw(context);
33}
_DrawContext DrawContext
Definition fx.h:21
fl::shared_ptr< Fx > fx
Definition fx_layer.h:33
fl::shared_ptr< Frame > frame
Definition fx_layer.h:32
bool running
Definition fx_layer.h:34
void * memfill(void *ptr, int value, fl::size num)
Definition memfill.h:11
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348

References frame, fx, fl::make_shared(), fl::memfill(), and running.

+ Here is the call graph for this function: