FastLED 3.10.10
Loading...
Searching...
No Matches

◆ setScreenMap() [3/4]

Channel & fl::Channel::setScreenMap ( const fl::XYMap & map,
float diameter = -1.f )

Set screen map for JS canvas visualization from XYMap.

Parameters
map2D addressing mode (serpentine, line-by-line, etc.)
diameterOptional LED diameter for canvas rendering
Returns
Reference to this channel for method chaining

Definition at line 1231 of file channel.cpp.hpp.

1231 {
1232 fl::ScreenMap screenmap = map.toScreenMap();
1233 if (diameter <= 0.0f) {
1234 screenmap.setDiameter(.15f); // Default diameter for small matrices
1235 } else {
1236 screenmap.setDiameter(diameter);
1237 }
1240 return *this;
1241}
fl::ScreenMap screenmap
fl::ScreenMap mScreenMap
Definition channel.h:455
CLEDController * asController() FL_NO_EXCEPT
Get pointer to base CLEDController for linked list traversal.
Definition channel.h:194
static void onCanvasUiSet(CLEDController *strip, const ScreenMap &xymap) FL_NO_EXCEPT
void setDiameter(float diameter) FL_NO_EXCEPT
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Definition map.h:283

References Channel(), asController(), fl::FL_NO_EXCEPT, mScreenMap, fl::EngineEvents::onCanvasUiSet(), and screenmap.

Referenced by setScreenMap(), and setScreenMap().

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