25 for (
size_t i = 0; i <
mLayers.size(); ++i) {
36 if (!layer->getXYMap().isRectangularGrid()) {
37 if (!
getXYMap().isRectangularGrid()) {
38 FASTLED_WARN(
"Blend2d has a xymap, but so does the Sub layer " << layer->fxName() <<
", the sub layer will have it's map replaced with a rectangular map, to avoid double transformation.");
44 Entry entry(layer, blurAmount, blurPasses);
68 uint8_t blur_amount = it->blur_amount;
69 if (blur_amount > 0) {
71 uint8_t blur_passes =
MAX(1, it->blur_passes);
72 for (uint8_t i = 0; i < blur_passes; ++i) {
83 uint16_t width =
mXyMap.getWidth();
84 uint16_t height =
mXyMap.getHeight();
88 for (uint8_t i = 0; i < blur_passes; ++i) {
107 if (layer.fx == fx) {
108 layer.blur_amount = blur_amount;
109 layer.blur_passes = blur_passes;
114 FASTLED_WARN(
"Fx2d not found in Blend2d::setBlurParams");
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
uint8_t mGlobalBlurPasses
fl::string fxName() const override
Blend2d(const XYMap &xymap)
void add(Fx2dPtr layer, const Params &p=Params())
uint8_t mGlobalBlurAmount
bool setParams(Fx2dPtr fx, const Params &p)
HeapVector< Entry > mLayers
void draw(DrawContext context) override
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.
shared_ptr< T > make_shared_no_tracking(T &obj)
shared_ptr< T > make_shared(Args &&... args)
@ DRAW_MODE_BLEND_BY_MAX_BRIGHTNESS
Declares classes for managing logical groups of LEDs.
Representation of an RGB pixel (Red, Green, Blue)