MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSLDSetColorObject

Function msSLDSetColorObject

mapogcsld.c:3211–3223  ·  view source on GitHub ↗

/ void msSLDSetColorObject(char *psHexColor, colorObj */ psColor) */ / Utility function to exctract rgb values from an hexadecimal */ color string (format is : #aaff08) and set it in the color */ object. */ /

Source from the content-addressed store, hash-verified

3209/* object. */
3210/************************************************************************/
3211int msSLDSetColorObject(char *psHexColor, colorObj *psColor)
3212{
3213 if (psHexColor && psColor && strlen(psHexColor)== 7 &&
3214 psHexColor[0] == '#')
3215 {
3216
3217 psColor->red = msHexToInt(psHexColor+1);
3218 psColor->green = msHexToInt(psHexColor+3);
3219 psColor->blue= msHexToInt(psHexColor+5);
3220 }
3221
3222 return MS_SUCCESS;
3223}
3224
3225#endif
3226

Callers 1

Calls 1

msHexToIntFunction · 0.85

Tested by

no test coverage detected