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

◆ reset()

template<typename T>
void fl::Grid< T >::reset ( uint32_t width,
uint32_t height )
inline

Definition at line 15 of file grid.h.

15 {
16 if (width != mWidth || height != mHeight) {
17 mWidth = width;
19 // Only re-allocate if the size is now bigger.
20 mData.reserve(width * height);
21 // Fill with default objects.
22 while (mData.size() < width * height) {
23 mData.push_back(T());
24 }
26 width - 1, height - 1);
27 }
28 clear();
29 }
uint32_t height() const
Definition grid.h:61
void clear()
Definition grid.h:31
uint32_t mHeight
Definition grid.h:84
uint32_t mWidth
Definition grid.h:83
fl::MatrixSlice< T > mSlice
Definition grid.h:85
uint32_t width() const
Definition grid.h:60
fl::vector< T > mData
Definition grid.h:82
Definition grid.h:9

References clear(), height(), mData, mHeight, mSlice, mWidth, and width().

Referenced by Grid().

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