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

Function initScalebar

mapfile.c:4555–4574  ·  view source on GitHub ↗

** Initialize, load and free a scalebarObj structure */

Source from the content-addressed store, hash-verified

4553** Initialize, load and free a scalebarObj structure
4554*/
4555void initScalebar(scalebarObj *scalebar)
4556{
4557 MS_INIT_COLOR(scalebar->imagecolor, 255,255,255,255);
4558 scalebar->width = 200;
4559 scalebar->height = 3;
4560 scalebar->style = 0; /* only 2 styles at this point */
4561 scalebar->intervals = 4;
4562 initLabel(&scalebar->label);
4563 scalebar->label.position = MS_XY; /* override */
4564 MS_INIT_COLOR(scalebar->backgroundcolor, -1,-1,-1,255); /* if not set, scalebar creation needs to set this to match the background color */
4565 MS_INIT_COLOR(scalebar->color, 0,0,0,255); /* default to black */
4566 MS_INIT_COLOR(scalebar->outlinecolor, -1,-1,-1,255);
4567 scalebar->units = MS_MILES;
4568 scalebar->status = MS_OFF;
4569 scalebar->position = MS_LL;
4570 scalebar->transparent = MS_NOOVERRIDE; /* no transparency */
4571 scalebar->interlace = MS_NOOVERRIDE;
4572 scalebar->postlabelcache = MS_FALSE; /* draw with labels */
4573 scalebar->align = MS_ALIGN_CENTER;
4574}
4575
4576void freeScalebar(scalebarObj *scalebar) {
4577 freeLabel(&(scalebar->label));

Callers 2

msCopyScalebarFunction · 0.85
initMapFunction · 0.85

Calls 1

initLabelFunction · 0.85

Tested by

no test coverage detected