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

◆ add() [2/2]

void fl::Blend2d::add ( Fx2dPtr layer,
const Params & p = Params() )

Definition at line 35 of file blend.cpp.

35 {
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.");
39 layer->setXYMap(XYMap::constructRectangularGrid(layer->getWidth(), layer->getHeight()));
40 }
41 }
42 uint8_t blurAmount = p.blur_amount;
43 uint8_t blurPasses = p.blur_passes;
44 Entry entry(layer, blurAmount, blurPasses);
45 mLayers.push_back(entry);
46}
HeapVector< Entry > mLayers
Definition blend.h:58
XYMap & getXYMap()
Definition fx2d.h:27
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0)
Definition xymap.cpp:34
Definition blend.h:50
#define FASTLED_WARN
Definition warn.h:7

References fl::Blend2dParams::blur_amount, fl::Blend2dParams::blur_passes, fl::XYMap::constructRectangularGrid(), FASTLED_WARN, fl::Fx2d::getXYMap(), and mLayers.

Referenced by add().

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