Skip to content

Commit

Permalink
Changed legend builder to clear any colorObj pen values. Need to do t…
Browse files Browse the repository at this point in the history
…his in case map file was used previously.

git-svn-id: http://svn.osgeo.org/mapserver/trunk@1411 7532c77e-422f-0410-93f4-f0b67bdd69e2
  • Loading branch information
sdlime committed Aug 16, 2002
1 parent 317d5fa commit 19dbf0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
1 change: 0 additions & 1 deletion legend.c
Expand Up @@ -30,7 +30,6 @@ int main(int argc, char *argv[])
msSaveImage(NULL, img, argv[2]);

msFreeImage(img);

msFreeMap(map);

return(MS_TRUE);
Expand Down
23 changes: 6 additions & 17 deletions map.h
Expand Up @@ -792,7 +792,6 @@ typedef struct {
int msSaveImage(mapObj *map, imageObj *img, char *filename);
void msFreeImage(imageObj *img);


// Function prototypes, not wrapable

#ifndef SWIG
Expand Down Expand Up @@ -1036,19 +1035,15 @@ int msGMLWriteQuery(mapObj *map, char *filename); // mapgml.c
/* ==================================================================== */
/* Prototypes for functions in mapdraw.c */
/* ==================================================================== */
void msClearPenValues(mapObj *map);
imageObj *msDrawMap(mapObj *map);

imageObj *msDrawQueryMap(mapObj *map);

int msDrawLayer(mapObj *map, layerObj *layer, imageObj *image);

int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image);

int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image);

int msDrawWMSLayer(mapObj *map, layerObj *layer, imageObj *image);

int msDrawShape(mapObj *map, layerObj *layer, shapeObj *shape, imageObj *image, int overlay);
int msDrawShape(mapObj *map, layerObj *layer, shapeObj *shape, imageObj *image, int style);
int msDrawPoint(mapObj *map, layerObj *layer, pointObj *point, imageObj *image, int classindex, char *labeltext);

void msCircleDrawLineSymbol(symbolSetObj *symbolset, imageObj *image, pointObj *p, double r, styleObj *style, double scalefactor);
Expand All @@ -1057,22 +1052,16 @@ void msDrawMarkerSymbol(symbolSetObj *symbolset,imageObj *image, pointObj *p, st
void msDrawLineSymbol(symbolSetObj *symbolset, imageObj *image, shapeObj *p, styleObj *style, double scalefactor);
void msDrawShadeSymbol(symbolSetObj *symbolset, imageObj *image, shapeObj *p, styleObj *style, double scalefactor);

int msDrawLabel(imageObj *image, pointObj labelPnt, char *string,
labelObj *label, fontSetObj *fontset, double scalefactor);

int msDrawText(imageObj *image, pointObj labelPnt, char *string,
labelObj *label, fontSetObj *fontset, double scalefactor);

int msDrawLabel(imageObj *image, pointObj labelPnt, char *string, labelObj *label, fontSetObj *fontset, double scalefactor);
int msDrawText(imageObj *image, pointObj labelPnt, char *string, labelObj *label, fontSetObj *fontset, double scalefactor);
int msDrawLabelCache(imageObj *image, mapObj *map);

void msImageStartLayer(mapObj *map, layerObj *layer, imageObj *image);
void msImageEndLayer(mapObj *map, layerObj *layer, imageObj *image);


void msDrawStartShape(mapObj *map, layerObj *layer, imageObj *image,
shapeObj *shape);
void msDrawEndShape(mapObj *map, layerObj *layer, imageObj *image,
shapeObj *shape);
void msDrawStartShape(mapObj *map, layerObj *layer, imageObj *image, shapeObj *shape);
void msDrawEndShape(mapObj *map, layerObj *layer, imageObj *image, shapeObj *shape);



Expand Down
4 changes: 2 additions & 2 deletions maplegend.c
Expand Up @@ -184,8 +184,6 @@ imageObj *msDrawLegend(mapObj *map)
size_y += MS_MAX(heights[i], map->legend.keysizey);
}

// printf("size: %d,%d\n", size_x, size_y);

/*
** Initialize the legend image
*/
Expand All @@ -202,6 +200,8 @@ imageObj *msDrawLegend(mapObj *map)
if(image != NULL)
msImageInitGD(image, &(map->legend.imagecolor));

msClearPenValues(map); // just in case the mapfile has already been screwed with

pnt.y = VMARGIN;

/* for(i=0; i<map->numlayers; i++) { */
Expand Down
2 changes: 0 additions & 2 deletions scalebar.c
Expand Up @@ -24,14 +24,12 @@ int main(int argc, char *argv[])

image = msDrawScalebar(map);


if(!image) {
msWriteError(stderr);
exit(0);
}

msSaveImage(NULL, image, argv[2]);

msFreeImage(image);

msFreeMap(map);
Expand Down

0 comments on commit 19dbf0d

Please sign in to comment.