- 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 53 of file blend.cpp.
53 {
56
57
58 bool first = true;
61 tmp_ctx.leds =
mFrame->rgb();
62 auto &fx = it->fx;
63 fx->draw(tmp_ctx);
66 first = false;
67
68 uint8_t blur_amount = it->blur_amount;
69 if (blur_amount > 0) {
70 const XYMap &
xyMap = fx->getXYMap();
71 uint8_t blur_passes =
MAX(1, it->blur_passes);
72 for (uint8_t i = 0; i < blur_passes; ++i) {
73
76 }
77 }
79 }
80
82
83 uint16_t width =
mXyMap.getWidth();
84 uint16_t height =
mXyMap.getHeight();
88 for (uint8_t i = 0; i < blur_passes; ++i) {
89
91 }
92 }
93
94
95
96
99}
uint8_t mGlobalBlurPasses
uint8_t mGlobalBlurAmount
HeapVector< Entry > mLayers
uint16_t xyMap(uint16_t x, uint16_t y) const
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0)
void blur2d(CRGB *leds, fl::u8 width, fl::u8 height, fract8 blur_amount, const XYMap &xymap)
Two-dimensional blur filter.
@ DRAW_MODE_BLEND_BY_MAX_BRIGHTNESS
References fl::blur2d(), fl::XYMap::constructRectangularGrid(), fl::DRAW_MODE_BLEND_BY_MAX_BRIGHTNESS, fl::DRAW_MODE_OVERWRITE, fl::_DrawContext::leds, MAX, mFrame, mFrameTransform, mGlobalBlurAmount, mGlobalBlurPasses, mLayers, fl::Fx2d::mXyMap, and fl::Fx2d::xyMap().