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

Function writeLegend

mapfile.c:4530–4550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4528}
4529
4530static void writeLegend(FILE *stream, int indent, legendObj *legend)
4531{
4532 colorObj c;
4533
4534 indent++;
4535 writeBlockBegin(stream, indent, "LEGEND");
4536 MS_INIT_COLOR(c,255,255,255,255);
4537 writeColor(stream, indent, "IMAGECOLOR", &c, &(legend->imagecolor));
4538 writeKeyword(stream, indent, "INTERLACE", legend->interlace, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE");
4539 writeDimension(stream, indent, "KEYSIZE", legend->keysizex, legend->keysizey, NULL, NULL);
4540 writeDimension(stream, indent, "KEYSPACING", legend->keyspacingx, legend->keyspacingy, NULL, NULL);
4541 writeLabel(stream, indent, &(legend->label));
4542 writeColor(stream, indent, "OUTLINECOLOR", NULL, &(legend->outlinecolor));
4543 if(legend->status == MS_EMBED) writeKeyword(stream, indent, "POSITION", legend->position, 6, MS_LL, "LL", MS_UL, "UL", MS_UR, "UR", MS_LR, "LR", MS_UC, "UC", MS_LC, "LC");
4544 writeKeyword(stream, indent, "POSTLABELCACHE", legend->postlabelcache, 1, MS_TRUE, "TRUE");
4545 writeKeyword(stream, indent, "STATUS", legend->status, 3, MS_ON, "ON", MS_OFF, "OFF", MS_EMBED, "EMBED");
4546 writeKeyword(stream, indent, "TRANSPARENT", legend->transparent, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE");
4547 writeString(stream, indent, "TEMPLATE", NULL, legend->template);
4548 writeBlockEnd(stream, indent, "LEGEND");
4549 writeLineFeed(stream);
4550}
4551
4552/*
4553** Initialize, load and free a scalebarObj structure

Callers 1

msSaveMapFunction · 0.85

Calls 8

writeBlockBeginFunction · 0.85
writeColorFunction · 0.85
writeKeywordFunction · 0.85
writeDimensionFunction · 0.85
writeLabelFunction · 0.85
writeStringFunction · 0.85
writeBlockEndFunction · 0.85
writeLineFeedFunction · 0.85

Tested by

no test coverage detected