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

◆ data()

fl::span< CRGB > fl::Corkscrew::data ( )

Definition at line 234 of file corkscrew.cpp.

234 {
235 // Use variant storage if available, otherwise fall back to input surface
236 if (!mPixelStorage.empty()) {
237 if (mPixelStorage.template is<fl::span<CRGB>>()) {
238 return mPixelStorage.template get<fl::span<CRGB>>();
239 } else if (mPixelStorage.template is<fl::vector<CRGB, fl::allocator_psram<CRGB>>>()) {
241 return fl::span<CRGB>(vec.data(), vec.size());
242 }
243 }
244
245 // Fall back to input surface data as span
247 return fl::span<CRGB>(surface->data(), surface->size());
248}
fl::shared_ptr< fl::Grid< CRGB > > & getOrCreateInputSurface()
fl::Grid< CRGB > & surface()
PixelStorage mPixelStorage
Definition corkscrew.h:239
Slice< T > span
Definition span.h:8
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) noexcept
Definition pair.h:113
HeapVector< T, Allocator > vector
Definition vector.h:1214

References fl::get(), getOrCreateInputSurface(), mPixelStorage, and surface().

Referenced by calculateTileAtWrap(), and rawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: