MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / nsvg__parseColor

Function nsvg__parseColor

rEFIt_UEFI/libeg/nanosvg.cpp:1537–1547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1535}
1536
1537static unsigned int nsvg__parseColor(const char* str)
1538{
1539 size_t len = 0;
1540 while(*str == ' ') ++str;
1541 len = strlen(str);
1542 if (len >= 1 && *str == '#')
1543 return nsvg__parseColorHex(str);
1544 else if (len >= 4 && str[0] == 'r' && str[1] == 'g' && str[2] == 'b' && str[3] == '(')
1545 return nsvg__parseColorRGB(str);
1546 return nsvg__parseColorName(str);
1547}
1548
1549static float nsvg__parseOpacity(const char* str)
1550{

Callers 1

nsvg__parseAttrFunction · 0.85

Calls 4

nsvg__parseColorHexFunction · 0.85
nsvg__parseColorRGBFunction · 0.85
nsvg__parseColorNameFunction · 0.85
strlenFunction · 0.50

Tested by

no test coverage detected