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

◆ blur2d() [4/4]

void fl::gfx::blur2d ( fl::span< CRGB > leds,
u8 width,
u8 height,
fract8 blur_amount,
const XYMap & xymap )

Two-dimensional blur filter (span version).

Spreads light to 8 XY neighbors.

  • 0 = no spread at all
  • 64 = moderate spreading
  • 172 = maximum smooth, even spreading
  • 173..255 = wider spreading, but increasing flicker

Total light is NOT entirely conserved, so many repeated calls to 'blur' will also result in the light fading, eventually all the way to black; this is by design so that it can be used to (slowly) clear the LEDs to black.

Parameters
ledsspan of LEDs to blur
widththe width of the matrix
heightthe height of the matrix
blur_amountthe amount of blur to apply

Definition at line 87 of file blur.cpp.hpp.

88 {
91}
fl::CRGB leds[NUM_LEDS]
XYMap xymap
void blurRows(fl::span< CRGB > leds, fl::u8 width, fl::u8 height, fract8 blur_amount, const XYMap &xyMap)
Perform a blur1d() on every row of a rectangular matrix (span version).
Definition blur.cpp.hpp:133
void blurColumns(fl::span< CRGB > leds, fl::u8 width, fl::u8 height, fract8 blur_amount, const XYMap &xyMap)
Perform a blur1d() on every column of a rectangular matrix (span version).
Definition blur.cpp.hpp:172
u8 u8 height
Definition blur.h:186
u8 u8 fract8 blur_amount
Definition blur.h:186
u8 width
Definition blur.h:186

References fl::blur_amount, blurColumns(), blurRows(), fl::height, leds, fl::width, and xymap.

Referenced by fl::blur2d(), fl::blur2d(), fl::blur2d(), and blur2d().

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