FastLED 3.10.6
Loading...
Searching...
No Matches

◆ pixel()

void mood_ring::RingCanvas::pixel ( int i,
const RGBf & color,
float gain )

Add to one pixel, index wrapped.

Definition at line 85 of file ring_canvas.cpp.

85 {
86 const int n = size();
87 if (n <= 0 || gain <= 0.0f)
88 return;
89 i %= n;
90 if (i < 0)
91 i += n;
92 RGBf &p = mPx[static_cast<fl::size>(i)];
93 p.r += color.r * gain;
94 p.g += color.g * gain;
95 p.b += color.b * gain;
96}
fl::span< RGBf > mPx
Definition ring_canvas.h:92

References mood_ring::RGBf::b, mood_ring::RGBf::g, mPx, mood_ring::RGBf::r, and size().

Referenced by mood_ring::FlowLayer::drawGrains(), lobe(), and ring().

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