| 617 | } |
| 618 | |
| 619 | static void writeColor(FILE *stream, int indent, const char *name, colorObj *defaultColor, colorObj *color) { |
| 620 | if (!defaultColor && !MS_VALID_COLOR(*color)) return; |
| 621 | else if(defaultColor && MS_COMPARE_COLOR(*defaultColor, *color)) return; /* if defaultColor has the same value than the color, return.*/ |
| 622 | |
| 623 | writeIndent(stream, ++indent); |
| 624 | #if ALPHACOLOR_ENABLED |
| 625 | fprintf(stream, "%s %d %d %d\n", name, color->red, color->green, color->blue, color->alpha); |
| 626 | #else |
| 627 | fprintf(stream, "%s %d %d %d\n", name, color->red, color->green, color->blue); |
| 628 | #endif |
| 629 | } |
| 630 | |
| 631 | /* todo: deal with alpha's... */ |
| 632 | static void writeColorRange(FILE *stream, int indent, const char *name, colorObj *mincolor, colorObj *maxcolor) { |
no test coverage detected