/ 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. */ /
| 3209 | /* object. */ |
| 3210 | /************************************************************************/ |
| 3211 | int 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 |
no test coverage detected