[mapserver-commits] r9350 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Sep 25 12:09:10 EDT 2009


Author: warmerdam
Date: 2009-09-25 12:09:09 -0400 (Fri, 25 Sep 2009)
New Revision: 9350

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapgd.c
Log:
removed unused drawVectorSymbolGD() function

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-09-25 16:03:46 UTC (rev 9349)
+++ trunk/mapserver/HISTORY.TXT	2009-09-25 16:09:09 UTC (rev 9350)
@@ -18,6 +18,8 @@
 
  - const changes to avoid warnings with msLoadProjectionString()
 
+ - mapgd.c: removed unused drawVectorSymbolGD() function.
+
 Version 5.6.0-beta1 (2009-09-23):
 ---------------------------------
 

Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c	2009-09-25 16:03:46 UTC (rev 9349)
+++ trunk/mapserver/mapgd.c	2009-09-25 16:09:09 UTC (rev 9350)
@@ -1033,84 +1033,7 @@
      free(edge);
 }
 
-
 /*
-** Function to draw a vector symbol, using a given style in an image. Image could be a map
-** or a tile/brush. Use will vary by point, line or polygon renderer.
-*/
-static int drawVectorSymbolGD(gdImagePtr img, symbolObj *symbol, styleObj *style, int ox, int oy) 
-{
-  int j; /* loop counters */
-  int fc, oc; /* colors */
-
-  if(symbol->type != MS_SYMBOL_VECTOR) {
-    msSetError(MS_GDERR, "Incorrect symbol type, expected MS_SYMBOL_VECTOR.", "drawVectorSymbolGD()");
-    return MS_FAILURE;
-  }
-
-  fc = style->color.pen;
-  oc = style->outlinecolor.pen;
-
-  /* todo set width/brush */
-
-  if(symbol->filled) { /* filled */
-    int numPoints;    
-    gdPoint points[MS_MAXVECTORPOINTS];
-      
-    numPoints = 0;
-    for(j=0;j < symbol->numpoints;j++) {  /* step through the marker points */
-      if((symbol->points[j].x < 0) && (symbol->points[j].x < 0)) { /* new polygon (PENUP) */
-	if(numPoints>2) {
-          if(fc >= 0) gdImageFilledPolygon(img, points, numPoints, fc);
-	  if(oc >= 0) gdImagePolygon(img, points, numPoints, oc);
-        }
-        numPoints = 0;
-      } else {
-  	points[numPoints].x = MS_NINT(style->size*symbol->points[j].x + ox);
-	points[numPoints].y = MS_NINT(style->size*symbol->points[j].y + oy); 
-        numPoints++;
-      }
-    }
-
-    if(fc >= 0) gdImageFilledPolygon(img, points, numPoints, fc);
-    if(oc >= 0) gdImagePolygon(img, points, numPoints, oc);
-      
-  } else  { /* NOT filled */
-    gdPoint p1, p2;
-
-    if(fc < 0) fc = oc; /* try the outline color (reference maps sometimes do this when combining a box and a custom vector marker) */
-    if(fc < 0) return MS_FAILURE;
-      
-    p1.x = MS_NINT(style->size*symbol->points[0].x + ox); /* convert first point in marker */
-    p1.y = MS_NINT(style->size*symbol->points[0].y + oy);
-
-    /* gdImageSetThickness(img, width); */
-      
-    for(j=1;j < symbol->numpoints;j++) { /* step through the marker points */
-      if((symbol->points[j].x < 0) && (symbol->points[j].x < 0)) {
-	p1.x = MS_NINT(style->size*symbol->points[j].x + ox);
-	p1.y = MS_NINT(style->size*symbol->points[j].y + oy);
-      } else {
-	if((symbol->points[j-1].x < 0) && (symbol->points[j-1].y < 0)) { /* Last point was PENUP, now a new beginning */
-	  p1.x = MS_NINT(style->size*symbol->points[j].x + ox);
-	  p1.y = MS_NINT(style->size*symbol->points[j].y + oy);
-	} else {
-	  p2.x = MS_NINT(style->size*symbol->points[j].x + ox);
-	  p2.y = MS_NINT(style->size*symbol->points[j].y + oy);
-	  gdImageLine(img, p1.x, p1.y, p2.x, p2.y, fc);
-	  p1 = p2;
-	}
-      }
-    } /* end for loop */   
-  } /* end if-then-else */
-
-  /* restore a few things */
-  gdImageSetThickness(img, 1);
-
-  return MS_SUCCESS;
-}
-
-/*
 **
 ** Begin renderers for circles, points, lines and polygons.
 **



More information about the mapserver-commits mailing list