| 4674 | } |
| 4675 | |
| 4676 | static void writeScalebar(FILE *stream, int indent, scalebarObj *scalebar) |
| 4677 | { |
| 4678 | colorObj c; |
| 4679 | |
| 4680 | indent++; |
| 4681 | writeBlockBegin(stream, indent, "SCALEBAR"); |
| 4682 | writeKeyword(stream, indent, "ALIGN", scalebar->align, 2, MS_ALIGN_LEFT, "LEFT", MS_ALIGN_RIGHT, "RIGHT"); |
| 4683 | writeColor(stream, indent, "BACKGROUNDCOLOR", NULL, &(scalebar->backgroundcolor)); |
| 4684 | MS_INIT_COLOR(c,0,0,0,255); |
| 4685 | writeColor(stream, indent, "COLOR", &c, &(scalebar->color)); |
| 4686 | writeColor(stream, indent, "IMAGECOLOR", NULL, &(scalebar->imagecolor)); |
| 4687 | writeKeyword(stream, indent, "INTERLACE", scalebar->interlace, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE"); |
| 4688 | writeNumber(stream, indent, "INTERVALS", -1, scalebar->intervals); |
| 4689 | writeLabel(stream, indent, &(scalebar->label)); |
| 4690 | writeColor(stream, indent, "OUTLINECOLOR", NULL, &(scalebar->outlinecolor)); |
| 4691 | if(scalebar->status == MS_EMBED) writeKeyword(stream, indent, "POSITION", scalebar->position, 6, MS_LL, "LL", MS_UL, "UL", MS_UR, "UR", MS_LR, "LR", MS_UC, "UC", MS_LC, "LC"); |
| 4692 | writeKeyword(stream, indent, "POSTLABELCACHE", scalebar->postlabelcache, 1, MS_TRUE, "TRUE"); |
| 4693 | writeDimension(stream, indent, "SIZE", scalebar->width, scalebar->height, NULL, NULL); |
| 4694 | writeKeyword(stream, indent, "STATUS", scalebar->status, 3, MS_ON, "ON", MS_OFF, "OFF", MS_EMBED, "EMBED"); |
| 4695 | writeNumber(stream, indent, "STYLE", 0, scalebar->style); |
| 4696 | writeKeyword(stream, indent, "TRANSPARENT", scalebar->transparent, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE"); |
| 4697 | writeKeyword(stream, indent, "UNITS", scalebar->units, 6, MS_INCHES, "INCHES", MS_FEET ,"FEET", MS_MILES, "MILES", MS_METERS, "METERS", MS_KILOMETERS, "KILOMETERS", MS_NAUTICALMILES, "NAUTICALMILES"); |
| 4698 | writeBlockEnd(stream, indent, "SCALEBAR"); |
| 4699 | writeLineFeed(stream); |
| 4700 | } |
| 4701 | |
| 4702 | /* |
| 4703 | ** Initialize a queryMapObj structure |
no test coverage detected