[mapserver-commits] r9181 - sandbox/davidK
svn at osgeo.org
svn at osgeo.org
Sun Jul 19 17:44:14 EDT 2009
Author: davidK
Date: 2009-07-19 17:44:13 -0400 (Sun, 19 Jul 2009)
New Revision: 9181
Modified:
sandbox/davidK/mapdraw.c
Log:
modified codeblocks containing MS_MAP2IMAGE macro
Modified: sandbox/davidK/mapdraw.c
===================================================================
--- sandbox/davidK/mapdraw.c 2009-07-17 14:23:42 UTC (rev 9180)
+++ sandbox/davidK/mapdraw.c 2009-07-19 21:44:13 UTC (rev 9181)
@@ -755,10 +755,10 @@
"msDrawLayer()");
return (MS_FAILURE);
}
- } else {
- image_draw->format->vtable->startNewLayer(image_draw,layer->opacity);
}
}
+
+ image_draw->format->vtable->startNewLayer(image_draw, layer);
}
#ifdef USE_AGG
else if(MS_RENDERER_AGG(image_draw->format)) {
@@ -1529,9 +1529,15 @@
#endif
if(layer->transform == MS_TRUE) {
- center.x = MS_MAP2IMAGE_X(center.x, map->extent.minx, map->cellsize);
- center.y = MS_MAP2IMAGE_Y(center.y, map->extent.maxy, map->cellsize);
- r /= map->cellsize;
+
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ center.x = MS_MAP2IMAGE_X(center.x, map->extent.minx, map->cellsize);
+ center.y = MS_MAP2IMAGE_Y(center.y, map->extent.maxy, map->cellsize);
+ }
+
+ r /= map->cellsize;
+
} else
msOffsetPointRelativeTo(¢er, layer);
@@ -1663,8 +1669,11 @@
else
annocallret = msPolygonLabelPoint(shape, &annopnt, -1);
- annopnt.x = MS_MAP2IMAGE_X(annopnt.x, map->extent.minx, map->cellsize);
- annopnt.y = MS_MAP2IMAGE_Y(annopnt.y, map->extent.maxy, map->cellsize);
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ annopnt.x = MS_MAP2IMAGE_X(annopnt.x, map->extent.minx, map->cellsize);
+ annopnt.y = MS_MAP2IMAGE_Y(annopnt.y, map->extent.maxy, map->cellsize);
+ }
}
if(layer->transform == MS_TRUE) {
@@ -1712,8 +1721,12 @@
if(layer->transform == MS_TRUE) {
if(!msPointInRect(point, &map->extent)) return(MS_SUCCESS);
- point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
- point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
+ point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+ }
} else
msOffsetPointRelativeTo(point, layer);
@@ -1759,8 +1772,11 @@
if(layer->transform == MS_TRUE) {
if(!msPointInRect(point, &map->extent)) continue; /* next point */
- point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
- point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
+ point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+ }
} else
msOffsetPointRelativeTo(point, layer);
@@ -1944,8 +1960,11 @@
else
annocallret = msPolygonLabelPoint(shape, &annopnt, -1);
- annopnt.x = MS_MAP2IMAGE_X(annopnt.x, map->extent.minx, map->cellsize);
- annopnt.y = MS_MAP2IMAGE_Y(annopnt.y, map->extent.maxy, map->cellsize);
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ annopnt.x = MS_MAP2IMAGE_X(annopnt.x, map->extent.minx, map->cellsize);
+ annopnt.y = MS_MAP2IMAGE_Y(annopnt.y, map->extent.maxy, map->cellsize);
+ }
}
for(s=0;s<layer->class[c]->numstyles;s++){
@@ -2058,8 +2077,13 @@
case MS_LAYER_ANNOTATION:
if(layer->transform == MS_TRUE) {
if(!msPointInRect(point, &map->extent)) return(0);
- point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
- point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
+ point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+ }
+
} else
msOffsetPointRelativeTo(point, layer);
@@ -2087,8 +2111,12 @@
case MS_LAYER_POINT:
if(layer->transform == MS_TRUE) {
if(!msPointInRect(point, &map->extent)) return(0);
- point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
- point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+
+ if(!(MS_RENDERER_PLUGIN(image->format) && image->format->renderer == MS_RENDER_WITH_KML))
+ {
+ point->x = MS_MAP2IMAGE_X(point->x, map->extent.minx, map->cellsize);
+ point->y = MS_MAP2IMAGE_Y(point->y, map->extent.maxy, map->cellsize);
+ }
} else
msOffsetPointRelativeTo(point, layer);
@@ -2503,7 +2531,12 @@
if( MS_RENDERER_PDF(map->outputformat) )
msDrawStartShapePDF(map, layer, image, shape);
#endif
-
+
+ if(MS_RENDERER_PLUGIN(image->format))
+ {
+ if (image->format->vtable->startShape)
+ image->format->vtable->startShape(image, shape);
+ }
}
}
More information about the mapserver-commits
mailing list