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

◆ data()

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

Definition at line 234 of file corkscrew.cpp.hpp.

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_psram<CRGB>>()) {
240 auto& vec = mPixelStorage.template get<fl::vector_psram<CRGB>>();
241 return vec;
242 }
243 }
244
245 // Fall back to input surface data as span
247 return surface->span();
248}
fl::shared_ptr< fl::Grid< CRGB > > & getOrCreateInputSurface()
fl::Grid< CRGB > & surface()
PixelStorage mPixelStorage
Definition corkscrew.h:232
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) FL_NOEXCEPT
Definition pair.h:115

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: