[mapserver-commits] r9443 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Oct 12 11:52:45 EDT 2009
Author: tbonfort
Date: 2009-10-12 11:52:44 -0400 (Mon, 12 Oct 2009)
New Revision: 9443
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapagg.cpp
trunk/mapserver/mapdraw.c
trunk/mapserver/mapprimitive.c
Log:
few more fixes for high res output (#3157)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-10-12 07:43:19 UTC (rev 9442)
+++ trunk/mapserver/HISTORY.TXT 2009-10-12 15:52:44 UTC (rev 9443)
@@ -15,6 +15,8 @@
Current Version (SVN trunk):
----------------------------
+- Few more fixes for high res output (#3157)
+
- Allow "DRIVER 'TEMPLATE'" or "DRIVER TEMPLATE" in output formats
- Correct sld generated from mapserver classes (#3133)
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2009-10-12 07:43:19 UTC (rev 9442)
+++ trunk/mapserver/mapagg.cpp 2009-10-12 15:52:44 UTC (rev 9443)
@@ -1770,8 +1770,6 @@
width = MS_MAX(width, style->minwidth*image->resolutionfactor);
width = MS_MIN(width, style->maxwidth*image->resolutionfactor);
- scalefactor = size / style->size;
-
angle_radians = style->angle*MS_DEG_TO_RAD;
ox = style->offsetx*scalefactor;
Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c 2009-10-12 07:43:19 UTC (rev 9442)
+++ trunk/mapserver/mapdraw.c 2009-10-12 15:52:44 UTC (rev 9443)
@@ -2341,8 +2341,8 @@
/* draw the background and background shadow (if necessary) */
if(MS_VALID_COLOR(label->backgroundshadowcolor)) {
MS_COPYCOLOR(&(style.color), &(label->backgroundshadowcolor));
- style.offsetx = label->backgroundshadowsizex*scalefactor;
- style.offsety = label->backgroundshadowsizey*scalefactor;
+ style.offsetx = label->backgroundshadowsizex*image->resolutionfactor;
+ style.offsety = label->backgroundshadowsizey*image->resolutionfactor;
msDrawShadeSymbol(&(map->symbolset), image, &billboard, &style, 1);
style.offsetx = 0;
style.offsety = 0;
@@ -2364,8 +2364,8 @@
/* draw the background and background shadow (if necessary) */
if(MS_VALID_COLOR(label->backgroundshadowcolor)) {
MS_COPYCOLOR(&(style.color), &(label->backgroundshadowcolor));
- style.offsetx = label->backgroundshadowsizex*scalefactor;
- style.offsety = label->backgroundshadowsizey*scalefactor;
+ style.offsetx = label->backgroundshadowsizex*image->resolutionfactor;
+ style.offsety = label->backgroundshadowsizey*image->resolutionfactor;
msDrawShadeSymbol(&(map->symbolset), image, &billboard, &style, 1);
style.offsetx = 0;
style.offsety = 0;
@@ -2451,8 +2451,8 @@
label_offset_x = labelPtr->offsetx*layerPtr->scalefactor;
label_offset_y = labelPtr->offsety*layerPtr->scalefactor;
- label_buffer = labelPtr->buffer*layerPtr->scalefactor;
- label_mindistance = labelPtr->mindistance*layerPtr->scalefactor;
+ label_buffer = labelPtr->buffer*image->resolutionfactor;
+ label_mindistance = labelPtr->mindistance*image->resolutionfactor;
/* if cachePtr->featuresize is set to -1, this check has been done in msPolylineLabelPath() */
if(labelPtr->autominfeaturesize && (cachePtr->featuresize != -1) && ((r.maxx-r.minx) > cachePtr->featuresize))
@@ -2577,8 +2577,8 @@
initStyle(&style);
if(MS_VALID_COLOR(labelPtr->backgroundshadowcolor)) {
MS_COPYCOLOR(&(style.color),&(labelPtr->backgroundshadowcolor));
- style.offsetx = labelPtr->backgroundshadowsizex*layerPtr->scalefactor;
- style.offsety = labelPtr->backgroundshadowsizey*layerPtr->scalefactor;
+ style.offsetx = labelPtr->backgroundshadowsizex*image->resolutionfactor;
+ style.offsety = labelPtr->backgroundshadowsizey*image->resolutionfactor;
msDrawShadeSymbol(&map->symbolset,image,&billboard,&style,1);
style.offsetx = 0;
style.offsety = 0;
Modified: trunk/mapserver/mapprimitive.c
===================================================================
--- trunk/mapserver/mapprimitive.c 2009-10-12 07:43:19 UTC (rev 9442)
+++ trunk/mapserver/mapprimitive.c 2009-10-12 15:52:44 UTC (rev 9443)
@@ -1629,8 +1629,9 @@
}
size = label->size*scalefactor;
- size = MS_MAX(size, label->minsize);
- size = MS_MIN(size, label->maxsize);
+ size = MS_MAX(size, label->minsize*img->resolutionfactor);
+ size = MS_MIN(size, label->maxsize*img->resolutionfactor);
+ scalefactor = size / label->size;
font = msLookupHashTable(&(fontset->fonts), label->font);
if(!font) {
More information about the mapserver-commits
mailing list