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

◆ draw()

void fl::VideoFxWrapper::draw ( DrawContext context)
overridevirtual
Parameters
nowThe current time in milliseconds. Fx writers are encouraged to use this instead of millis() directly as this will more deterministic behavior.

Implements fl::Fx.

Definition at line 180 of file video.cpp.

180 {
181 if (mVideo->needsFrame(context.now)) {
182 mFx->draw(context); // use the leds in the context as a tmp buffer.
183 mByteStream->writeCRGB(
184 context.leds,
185 mFx->getNumLeds()); // now write the leds to the byte stream.
186 }
187 bool ok = mVideo->draw(context.now, context.leds);
188 if (!ok) {
189 FASTLED_WARN("VideoFxWrapper: draw failed.");
190 }
191}
VideoImplPtr mVideo
Definition video.h:99
ByteStreamMemoryPtr mByteStream
Definition video.h:100
#define FASTLED_WARN
Definition warn.h:7

References FASTLED_WARN, fl::_DrawContext::leds, mByteStream, mFx, mVideo, and fl::_DrawContext::now.