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

◆ UpscalePaletteRepeat()

template<typename TSrcPalette, typename TDestPalette>
void fl::detail::UpscalePaletteRepeat ( const TSrcPalette & srcpal,
TDestPalette & destpal )

Definition at line 1185 of file colorutils.cpp.hpp.

1186 {
1187 const fl::u16 src_size = sizeof(srcpal.entries) / sizeof(srcpal.entries[0]);
1188 const fl::u16 dest_size =
1189 sizeof(destpal.entries) / sizeof(destpal.entries[0]);
1190 const fl::u16 repeat = dest_size / src_size;
1191 for (fl::u16 i = 0; i < src_size; ++i) {
1192 const fl::u16 start = i * repeat;
1193 for (fl::u16 j = 0; j < repeat; ++j) {
1194 destpal[static_cast<fl::u8>(start + j)] = srcpal[static_cast<fl::u8>(i)];
1195 }
1196 }
1197}
unsigned char u8
Definition s16x16x4.h:132

Referenced by fl::UpscalePalette(), and fl::UpscalePalette().

+ Here is the caller graph for this function: