- Parameters
-
now | The 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 47 of file blend.cpp.
47 {
50
51
52 bool first = true;
55 tmp_ctx.leds =
mFrame->rgb();
56 auto &fx = it->fx;
57 fx->draw(tmp_ctx);
60 first = false;
61
62 uint8_t blur_amount = it->blur_amount;
63 if (blur_amount > 0) {
64 const XYMap &
xyMap = fx->getXYMap();
65 uint8_t blur_passes =
MAX(1, it->blur_passes);
66 for (uint8_t i = 0; i < blur_passes; ++i) {
67
70 }
71 }
73 }
74
76
77 uint16_t width =
mXyMap.getWidth();
78 uint16_t height =
mXyMap.getHeight();
82 for (uint8_t i = 0; i < blur_passes; ++i) {
83
85 }
86 }
87
88
89
90
93}
uint8_t mGlobalBlurPasses
uint8_t mGlobalBlurAmount
HeapVector< Entry > mLayers
uint16_t xyMap(uint16_t x, uint16_t y) const
static XYMap constructRectangularGrid(uint16_t width, uint16_t height, uint16_t offset=0)
void blur2d(CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const XYMap &xymap)
Two-dimensional blur filter.
@ DRAW_MODE_BLEND_BY_BLACK
References blur2d(), fl::XYMap::constructRectangularGrid(), fl::DRAW_MODE_BLEND_BY_BLACK, fl::DRAW_MODE_OVERWRITE, fl::_DrawContext::leds, MAX, mFrame, mFrameTransform, mGlobalBlurAmount, mGlobalBlurPasses, mLayers, fl::Fx2d::mXyMap, and fl::Fx2d::xyMap().