Definition at line 251 of file corkscrew.cpp.
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
274 coord.x =
MAX(0,
MIN(coord.x,
static_cast<fl::i16
>(source_grid.
width()) - 1));
275 coord.y =
MAX(0,
MIN(coord.y,
static_cast<fl::i16
>(source_grid.
height()) - 1));
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->data()[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
References fl::Grid< T >::at(), at_no_wrap(), getOrCreateInputSurface(), fl::Grid< T >::height(), MAX, MIN, mNumLeds, readFromMulti(), size(), fl::Grid< T >::width(), fl::vec2< T >::x, and fl::vec2< T >::y.