Changeset 2172
- Timestamp:
- Jun 18, 2003, 6:39:52 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/mapserver/maplegend.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mapserver/maplegend.c
r2165 r2172 10 10 int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *class, int width, int height, gdImagePtr img, int dstX, int dstY) 11 11 { 12 int i ;12 int i, type; 13 13 shapeObj box, zigzag; 14 14 pointObj marker; … … 64 64 box.line[0].numpoints = 5; 65 65 66 type = lp->type; 67 68 // some polygon layers may be better drawn using zigzag if there is no fill 69 if(type == MS_LAYER_POLYGON) { 70 type = MS_LAYER_LINE; 71 for(i=0; i<class->numstyles; i++) { 72 if(MS_VALID_COLOR(class->styles[i].color)) { // there is a fill 73 type = MS_LAYER_POLYGON; 74 break; 75 } 76 } 77 } 78 66 79 /* 67 80 ** now draw the appropriate color/symbol/size combination 68 81 */ 69 switch( lp->type) {82 switch(type) { 70 83 case MS_LAYER_ANNOTATION: 71 84 case MS_LAYER_POINT: … … 81 94 case MS_LAYER_POLYGON: 82 95 for(i=0; i<class->numstyles; i++) { // TO DO: it may not be this easy 83 if(MS_VALID_COLOR(class->styles[ 0].color))96 if(MS_VALID_COLOR(class->styles[i].color)) 84 97 msDrawShadeSymbolGD(&map->symbolset, img, &box, &(class->styles[i]), 1.0); 85 98 else
Note:
See TracChangeset
for help on using the changeset viewer.
