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 189 of file video.cpp.

189 {
190 if (mVideo->needsFrame(context.now)) {
191 mFx->draw(context); // use the leds in the context as a tmp buffer.
192 mByteStream->writeCRGB(context.leds, mFx->getNumLeds()); // now write the leds to the byte stream.
193 }
194 bool ok = mVideo->draw(context.now, context.leds);
195 if (!ok) {
196 FASTLED_WARN("VideoFxWrapper: draw failed.");
197 }
198}
VideoImplPtr mVideo
Definition video.h:98
ByteStreamMemoryPtr mByteStream
Definition video.h:99
#define FASTLED_WARN
Definition warn.h:7

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