[mapserver-commits] r7229 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sun Dec 30 04:38:32 EST 2007
Author: tbonfort
Date: 2007-12-30 04:38:31 -0500 (Sun, 30 Dec 2007)
New Revision: 7229
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapagg.cpp
trunk/mapserver/mapgd.c
Log:
- enforce (-99 -99) to be the penup value for vector symbols (#1036)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2007-12-30 01:05:38 UTC (rev 7228)
+++ trunk/mapserver/HISTORY.TXT 2007-12-30 09:38:31 UTC (rev 7229)
@@ -12,6 +12,9 @@
Current Version (5.1-dev, SVN trunk):
-------------------------------------
+
+- enforce (-99 -99) to be the penup value for vector symbols (#1036)
+
- Support for labeling features (polygon & line) prior to clipping. This
results in stable label positions regardless of map extent. (#2447)
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2007-12-30 01:05:38 UTC (rev 7228)
+++ trunk/mapserver/mapagg.cpp 2007-12-30 09:38:31 UTC (rev 7229)
@@ -955,7 +955,7 @@
agg::path_storage path;
bool is_new=true;
for(int i=0;i < symbol->numpoints;i++) {
- if((symbol->points[i].x < 0) && (symbol->points[i].y < 0)) { // (PENUP)
+ if((symbol->points[i].x == -99) && (symbol->points[i].y == -99)) { // (PENUP)
is_new=true;
} else {
if(is_new) {
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2007-12-30 01:05:38 UTC (rev 7228)
+++ trunk/mapserver/mapgd.c 2007-12-30 09:38:31 UTC (rev 7229)
@@ -1683,7 +1683,7 @@
k = 0; /* point counter */
for(j=0;j < symbol->numpoints;j++) {
- if((symbol->points[j].x < 0) && (symbol->points[j].x < 0)) { /* new polygon (PENUP) */
+ if((symbol->points[j].x == -99) && (symbol->points[j].x == -99)) { /* new polygon (PENUP) */
if(k>2) {
if(fc >= 0)
gdImageFilledPolygon(img, mPoints, k, fc);
@@ -1714,11 +1714,8 @@
gdImageSetThickness(img, width);
for(j=1;j < symbol->numpoints;j++) { /* step through the marker */
- if((symbol->points[j].x < 0) && (symbol->points[j].x < 0)) {
- oldpnt.x = MS_NINT(d*symbol->points[j].x + offset_x);
- oldpnt.y = MS_NINT(d*symbol->points[j].y + offset_y);
- } else {
- if((symbol->points[j-1].x < 0) && (symbol->points[j-1].y < 0)) { /* Last point was PENUP, now a new beginning */
+ if((symbol->points[j].x != -99) || (symbol->points[j].x != -99)) {
+ if((symbol->points[j-1].x == -99) && (symbol->points[j-1].y == -99)) { /* Last point was PENUP, now a new beginning */
oldpnt.x = MS_NINT(d*symbol->points[j].x + offset_x);
oldpnt.y = MS_NINT(d*symbol->points[j].y + offset_y);
} else {
@@ -1933,7 +1930,7 @@
if (symbol->filled) {
k = 0; /* point counter */
for(i=0;i < symbol->numpoints;i++) {
- if((symbol->points[i].x < 0) && (symbol->points[i].x < 0)) { /* new polygon (PENUP) */
+ if((symbol->points[i].x == -99) && (symbol->points[i].x == -99)) { /* new polygon (PENUP) */
if(k>2) gdImageFilledPolygon(brush, points, k, brush_fc);
k = 0; /* reset point counter */
} else {
@@ -1949,10 +1946,7 @@
/* draw in the brush image */
for (i=1;i < symbol->numpoints;i++) {
- if((symbol->points[i].x == -99.) && (symbol->points[i].y == -99.)) {
- oldpnt.x = MS_NINT(symbol->points[i].x*d);
- oldpnt.y = MS_NINT(symbol->points[i].y*d);
- } else {
+ if((symbol->points[i].x != -99.) || (symbol->points[i].y != -99.)) {
if ((symbol->points[i-1].x == -99.) && (symbol->points[i-1].y == -99.)) {
/* Last point was PENUP, now a new beginning */
oldpnt.x = MS_NINT(symbol->points[i].x*d);
@@ -2279,7 +2273,7 @@
k = 0; /* point counter */
for(i=0;i < symbol->numpoints;i++) {
- if((symbol->points[i].x < 0) && (symbol->points[i].x < 0)) { /* new polygon (PENUP) */
+ if((symbol->points[i].x == -99 ) && (symbol->points[i].x == -99)) { /* new polygon (PENUP) */
if(k>2) gdImageFilledPolygon(tile, sPoints, k, tile_fc);
k = 0; /* reset point counter */
} else {
@@ -2299,11 +2293,8 @@
/* step through the shade sy */
for(i=1;i < symbol->numpoints;i++) {
- if((symbol->points[i].x < 0) && (symbol->points[i].y < 0)) {
- oldpnt.x = MS_NINT(d*symbol->points[i].x);
- oldpnt.y = MS_NINT(d*symbol->points[i].y);
- } else {
- if((symbol->points[i-1].x < 0) && (symbol->points[i-1].y < 0)) { /* Last point was PENUP, now a new beginning */
+ if((symbol->points[i].x != -99) || (symbol->points[i].y != -99)) {
+ if((symbol->points[i-1].x == -99) && (symbol->points[i-1].y == -99)) { /* Last point was PENUP, now a new beginning */
oldpnt.x = MS_NINT(d*symbol->points[i].x);
oldpnt.y = MS_NINT(d*symbol->points[i].y);
} else {
More information about the mapserver-commits
mailing list