FastLED 3.9.15
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 826 of file channel.cpp.hpp.

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

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

+ Here is the call graph for this function: