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

◆ draw()

void fl::Frame::draw ( fl::span< CRGB > leds,
DrawMode draw_mode = DrawMode::DRAW_MODE_OVERWRITE ) const

Definition at line 49 of file frame.cpp.hpp.

49 {
50 if (!mRgb.empty()) {
51 switch (draw_mode) {
52 case DrawMode::DRAW_MODE_BLEND: // DRAW_MODE_BLEND is for gfx primitives; treat as overwrite for Frame
54 fl::memcpy(leds.data(), mRgb.data(), mPixelsCount * sizeof(CRGB));
55 break;
56 }
58 for (size_t i = 0; i < mPixelsCount; ++i) {
60 }
61 break;
62 }
63 }
64 }
65}
fl::CRGB leds[NUM_LEDS]
fl::vector_psram< CRGB > mRgb
Definition frame.h:65
const size_t mPixelsCount
Definition frame.h:64
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT
fl::CRGB CRGB
Definition video.h:15
@ DRAW_MODE_OVERWRITE
Definition draw_mode.h:5
@ DRAW_MODE_BLEND_BY_MAX_BRIGHTNESS
Definition draw_mode.h:5
@ DRAW_MODE_BLEND
Definition draw_mode.h:5
static CRGB blendAlphaMaxChannel(const CRGB &upper, const CRGB &lower) FL_NOEXCEPT
Definition crgb.cpp.hpp:59

References fl::CRGB::blendAlphaMaxChannel(), fl::DRAW_MODE_BLEND, fl::DRAW_MODE_BLEND_BY_MAX_BRIGHTNESS, fl::DRAW_MODE_OVERWRITE, leds, fl::memcpy(), mPixelsCount, and mRgb.

Referenced by fl::video::FrameInterpolator::draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: