FastLED 3.10.8
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 1194 of file channel.cpp.hpp.

1194 {
1195 fl::ScreenMap screenmap = map.toScreenMap();
1196 if (diameter <= 0.0f) {
1197 screenmap.setDiameter(.15f); // Default diameter for small matrices
1198 } else {
1199 screenmap.setDiameter(diameter);
1200 }
1203 return *this;
1204}
fl::ScreenMap screenmap
fl::ScreenMap mScreenMap
Definition channel.h:458
CLEDController * asController() FL_NO_EXCEPT
Get pointer to base CLEDController for linked list traversal.
Definition channel.h:192
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: