MCPcopy Create free account
hub / github.com/MapServer/MapServer / writeColor

Function writeColor

mapfile.c:619–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619static 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... */
632static void writeColorRange(FILE *stream, int indent, const char *name, colorObj *mincolor, colorObj *maxcolor) {

Callers 8

writeLabelFunction · 0.85
writeStyleFunction · 0.85
writeLayerFunction · 0.85
writeReferenceMapFunction · 0.85
writeLegendFunction · 0.85
writeScalebarFunction · 0.85
writeQueryMapFunction · 0.85
msSaveMapFunction · 0.85

Calls 1

writeIndentFunction · 0.85

Tested by

no test coverage detected