FastLED 3.10.8
Loading...
Searching...
No Matches

◆ setScreenMap() [2/4]

Channel & fl::Channel::setScreenMap ( const fl::XMap & map)

Set screen map for 1D strip remapping from XMap.

Parameters
map1D addressing mode (linear, reverse, custom function, LUT)
Returns
Reference to this channel for method chaining

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

1217 {
1218 // Convert 1D XMap to 2D XYMap (width=length, height=1) and reuse existing logic
1219 fl::XYMap xymap = fl::XYMap::fromXMap(map);
1220 return setScreenMap(xymap, .15f); // Use default diameter for 1D strips
1221}
XYMap xymap
Channel & setScreenMap(const fl::XYMap &map, float diameter=-1.f) FL_NO_EXCEPT
Set screen map for JS canvas visualization from XYMap.
static XYMap fromXMap(const XMap &xmap) FL_NO_EXCEPT
Create an XYMap from an XMap (treats 1D as 2D with height=1)
Definition xymap.cpp.hpp:68
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Definition map.h:283

References Channel(), fl::FL_NO_EXCEPT, fl::XYMap::fromXMap(), setScreenMap(), and xymap.

+ Here is the call graph for this function: