[mapserver-commits] r9384 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Oct 6 13:38:54 EDT 2009
Author: aboudreault
Date: 2009-10-06 13:38:52 -0400 (Tue, 06 Oct 2009)
New Revision: 9384
Modified:
trunk/mapserver/mapagg.cpp
trunk/mapserver/mapgd.c
trunk/mapserver/mapsvg.c
trunk/mapserver/mapswf.c
Log:
Reversed MAXSIZE/MINSIZE change (#3153)
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2009-10-06 16:20:15 UTC (rev 9383)
+++ trunk/mapserver/mapagg.cpp 2009-10-06 17:38:52 UTC (rev 9384)
@@ -1040,8 +1040,8 @@
size = size*scalefactor;
} else
size = style->size*scalefactor;
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = style->width*scalefactor;
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1203,8 +1203,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
if (symbol->sizey)
d = size/symbol->sizey; /* compute the scaling factor (d) on the unrotated symbol */
else
@@ -1477,8 +1477,8 @@
}
else
size = style->size;
- if(size*scalefactor > (style->maxsize*scalefactor)) scalefactor = (float)style->maxsize/(float)size;
- if(size*scalefactor < (style->minsize*scalefactor)) scalefactor = (float)style->minsize/(float)size;
+ if(size*scalefactor > style->maxsize) scalefactor = (float)style->maxsize/(float)size;
+ if(size*scalefactor < style->minsize) scalefactor = (float)style->minsize/(float)size;
gap = MS_ABS(symbol->gap)* (int) scalefactor;
label.size = (size * scalefactor);
// label.minsize = style->minsize;
@@ -1571,8 +1571,8 @@
size = style->size;
size = (size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = (style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1760,8 +1760,8 @@
size = size*scalefactor;
} else
size = style->size*scalefactor;
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = style->width*scalefactor;
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1979,8 +1979,8 @@
double size;
size = label->size*scalefactor;
- size = MS_MAX(size, (label->minsize*scalefactor));
- size = MS_MIN(size, (label->maxsize*scalefactor));
+ size = MS_MAX(size, label->minsize);
+ size = MS_MIN(size, label->maxsize);
outlinewidth = label->outlinewidth*scalefactor;
shadowsizex = label->shadowsizex*scalefactor;
shadowsizey = label->shadowsizey*scalefactor;
@@ -2069,8 +2069,8 @@
char s[11]; /* UTF-8 characters can be up to 6 bytes wide, entities 10 (ϑ) */
size = label->size*scalefactor;
- size = MS_MAX(size, (label->minsize*scalefactor));
- size = MS_MIN(size, (label->maxsize*scalefactor));
+ size = MS_MAX(size, label->minsize);
+ size = MS_MIN(size, label->maxsize);
outlinewidth = label->outlinewidth*scalefactor;
shadowsizex = label->shadowsizex*scalefactor;
shadowsizey = label->shadowsizey*scalefactor;
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2009-10-06 16:20:15 UTC (rev 9383)
+++ trunk/mapserver/mapgd.c 2009-10-06 17:38:52 UTC (rev 9384)
@@ -72,8 +72,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
gap = MS_ABS(symbol->gap)* (int) scalefactor;
@@ -600,8 +600,8 @@
size = style->size;
size = MS_NINT(size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1072,8 +1072,8 @@
size = style->size;
size = MS_NINT(size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1284,8 +1284,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1504,8 +1504,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -1748,8 +1748,8 @@
/* if(size*scalefactor < style->minsize) scalefactor = (float)style->minsize/(float)size; */
size = MS_NINT(size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -2025,8 +2025,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -2882,8 +2882,8 @@
double size;
size = label->size*scalefactor;
- size = MS_MAX(size, (label->minsize*scalefactor));
- size = MS_MIN(size, (label->maxsize*scalefactor));
+ size = MS_MAX(size, label->minsize);
+ size = MS_MIN(size, label->maxsize);
#ifdef USE_GD_FT
if(!fontset) {
@@ -3004,8 +3004,8 @@
char s[11]; /* UTF-8 characters can be up to 6 bytes wide, html entities 10 */
size = label->size*scalefactor;
- size = MS_MAX(size, (label->minsize*scalefactor));
- size = MS_MIN(size, (label->maxsize*scalefactor));
+ size = MS_MAX(size, label->minsize);
+ size = MS_MIN(size, label->maxsize);
shadowsizex = label->shadowsizex*scalefactor;
shadowsizey = label->shadowsizey*scalefactor;
Modified: trunk/mapserver/mapsvg.c
===================================================================
--- trunk/mapserver/mapsvg.c 2009-10-06 16:20:15 UTC (rev 9383)
+++ trunk/mapserver/mapsvg.c 2009-10-06 17:38:52 UTC (rev 9384)
@@ -542,11 +542,11 @@
size = style->size;
/* TODO: Don't get this modification, is it needed elsewhere? */
- if(size*scalefactor > (style->maxsize*scalefactor)) scalefactor = (float)style->maxsize/(float)size;
- if(size*scalefactor < (style->minsize*scalefactor)) scalefactor = (float)style->minsize/(float)size;
+ if(size*scalefactor > style->maxsize) scalefactor = (float)style->maxsize/(float)size;
+ if(size*scalefactor < style->minsize) scalefactor = (float)style->minsize/(float)size;
size = MS_NINT(size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -756,8 +756,8 @@
else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
/* scale the symbol pattern */
if (symbol->patternlength > 0)
@@ -1074,8 +1074,8 @@
/* position, offset, angle, buffer, antialias, wrap, encoding */
size = label->size*scalefactor;
- size = MS_MAX(size, (label->minsize*scalefactor));
- size = MS_MIN(size, (label->maxsize*scalefactor));
+ size = MS_MAX(size, label->minsize);
+ size = MS_MIN(size, label->maxsize);
if(!fontset) {
msSetError(MS_TTFERR, "No fontset defined.", "msDrawTextSVG()");
@@ -1360,8 +1360,8 @@
size = MS_NINT(size*scalefactor);
} else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
Modified: trunk/mapserver/mapswf.c
===================================================================
--- trunk/mapserver/mapswf.c 2009-10-06 16:20:15 UTC (rev 9383)
+++ trunk/mapserver/mapswf.c 2009-10-06 17:38:52 UTC (rev 9384)
@@ -1476,8 +1476,8 @@
}
else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
if(style->symbol > symbolset->numsymbols || style->symbol < 0) /* no such symbol, 0 is OK */
@@ -1983,11 +1983,11 @@
size = MS_NINT(style->size*scalefactor);
/* TODO: Don't get this modification, is it needed elsewhere? */
- if(size*scalefactor > (style->maxsize*scalefactor)) scalefactor = (float)style->maxsize/(float)size;
- if(size*scalefactor < (style->minsize*scalefactor)) scalefactor = (float)style->minsize/(float)size;
+ if(size*scalefactor > style->maxsize) scalefactor = (float)style->maxsize/(float)size;
+ if(size*scalefactor < style->minsize) scalefactor = (float)style->minsize/(float)size;
size = MS_NINT(size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
width = MS_MAX(width, (style->minwidth*scalefactor));
@@ -2115,8 +2115,8 @@
}
else
size = MS_NINT(style->size*scalefactor);
- size = MS_MAX(size, (style->minsize*scalefactor));
- size = MS_MIN(size, (style->maxsize*scalefactor));
+ size = MS_MAX(size, style->minsize);
+ size = MS_MIN(size, style->maxsize);
width = MS_NINT(style->width*scalefactor);
More information about the mapserver-commits
mailing list