Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed legend builder to clear any colorObj pen values. Need to do t…

…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...
commit 19dbf0d0749aa1228f74a3097897dc2d9a5a2221 1 parent 317d5fa
@sdlime sdlime authored
Showing with 8 additions and 22 deletions.
  1. +0 −1  legend.c
  2. +6 −17 map.h
  3. +2 −2 maplegend.c
  4. +0 −2  scalebar.c
View
1  legend.c
@@ -30,7 +30,6 @@ int main(int argc, char *argv[])
msSaveImage(NULL, img, argv[2]);
msFreeImage(img);
-
msFreeMap(map);
return(MS_TRUE);
View
23 map.h
@@ -792,7 +792,6 @@ typedef struct {
int msSaveImage(mapObj *map, imageObj *img, char *filename);
void msFreeImage(imageObj *img);
-
// Function prototypes, not wrapable
#ifndef SWIG
@@ -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);
@@ -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);
View
4 maplegend.c
@@ -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
*/
@@ -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++) { */
View
2  scalebar.c
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.