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

◆ nsgif_str_disposal()

const char * fl::third_party::nsgif_str_disposal ( enum nsgif_disposal disposal)

Convert a disposal method to a string.

Parameters
[in]disposalThe disposal method to convert.
Returns
String representation of given disposal method.

Definition at line 2067 of file gif.cpp.hpp.

2068{
2069 static const char *const str[] = {
2070 "Unspecified", /* NSGIF_DISPOSAL_UNSPECIFIED */
2071 "None", /* NSGIF_DISPOSAL_NONE */
2072 "Restore background", /* NSGIF_DISPOSAL_RESTORE_BG */
2073 "Restore previous", /* NSGIF_DISPOSAL_RESTORE_PREV */
2074 "Restore quirk", /* NSGIF_DISPOSAL_RESTORE_QUIRK */
2075 };
2076
2077 if (disposal >= NSGIF_ARRAY_LEN(str) || str[disposal] == nullptr) {
2078 return "Unspecified";
2079 }
2080
2081 return str[disposal];
2082}
#define NSGIF_ARRAY_LEN(_a)
Helper macro to get number of elements in an array.
Definition gif.cpp.hpp:145

References FL_NOEXCEPT, and NSGIF_ARRAY_LEN.