251 {
252
253 if (use_multi_sampling) {
255 return;
256 }
257
258
260
261
262 target_surface->clear();
263
264
265 for (fl::size led_idx = 0; led_idx <
mNumLeds; ++led_idx) {
266
268
269
270 vec2i16 coord(
static_cast<fl::i16
>(rect_pos.x + 0.5f),
271 static_cast<fl::i16>(rect_pos.y + 0.5f));
272
273
276
277
278 CRGB sampled_color = source_grid.
at(coord.x, coord.y);
279
280
281 if (led_idx < target_surface->
size()) {
282 target_surface->span()[led_idx] = sampled_color;
283 }
284 }
285}
fl::shared_ptr< fl::Grid< CRGB > > & getOrCreateInputSurface()
void readFromMulti(const fl::Grid< CRGB > &target_grid) const
vec2f at_no_wrap(fl::u16 i) const
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT