FastLED 3.9.12
Loading...
Searching...
No Matches
Color Blurring Functions

Detailed Description

Functions for blurring colors

Functions

void blur1d (CRGB *leds, uint16_t numLeds, fract8 blur_amount)
 One-dimensional blur filter.
 
void blur2d (CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const fl::XYMap &xymap)
 Two-dimensional blur filter.
 
void blur2d (CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount) FASTLED_DEPRECATED("Use blur2d(...
 Legacy version of blur2d, which does not require an XYMap but instead implicitly binds to XY() function.
 
void blurRows (CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const fl::XYMap &xymap)
 Perform a blur1d() on every row of a rectangular matrix.
 
void blurColumns (CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const fl::XYMap &xymap)
 Perform a blur1d() on every column of a rectangular matrix.
 

Variables

void const fl::XYMap &xymap instead
 

Function Documentation

◆ blur1d()

void blur1d ( CRGB * leds,
uint16_t numLeds,
fract8 blur_amount )

One-dimensional blur filter.

Spreads light to 2 line 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
ledsa pointer to the LED array to blur
numLedsthe number of LEDs to blur
blur_amountthe amount of blur to apply

Definition at line 454 of file colorutils.cpp.

◆ blur2d() [1/2]

void blur2d ( CRGB * leds,
uint8_t width,
uint8_t height,
fract8 blur_amount )

Legacy version of blur2d, which does not require an XYMap but instead implicitly binds to XY() function.

If you are hitting a linker error here, then use blur2d(..., const fl::XYMap& xymap) instead.

◆ blur2d() [2/2]

void blur2d ( CRGB * leds,
uint8_t width,
uint8_t height,
fract8 blur_amount,
const fl::XYMap & xymap )

Two-dimensional blur filter.

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
ledsa pointer to the LED array to blur
widththe width of the matrix
heightthe height of the matrix
blur_amountthe amount of blur to apply

Definition at line 471 of file colorutils.cpp.

◆ blurColumns()

void blurColumns ( CRGB * leds,
uint8_t width,
uint8_t height,
fract8 blur_amount,
const fl::XYMap & xymap )

Perform a blur1d() on every column of a rectangular matrix.

See also
blur1d()
Parameters
ledsa pointer to the LED array to blur
widththe width of the matrix
heightthe height of the matrix
blur_amountthe amount of blur to apply

Definition at line 510 of file colorutils.cpp.

◆ blurRows()

void blurRows ( CRGB * leds,
uint8_t width,
uint8_t height,
fract8 blur_amount,
const fl::XYMap & xymap )

Perform a blur1d() on every row of a rectangular matrix.

See also
blur1d()
Parameters
ledsa pointer to the LED array to blur
widththe width of the matrix
heightthe height of the matrix
blur_amountthe amount of blur to apply

Definition at line 483 of file colorutils.cpp.

Variable Documentation

◆ instead

void const fl::XYMap& xymap instead

Definition at line 556 of file colorutils.h.