[mapserver-commits] r9886 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Feb 23 13:28:47 EST 2010
Author: sdlime
Date: 2010-02-23 13:28:46 -0500 (Tue, 23 Feb 2010)
New Revision: 9886
Modified:
trunk/mapserver/mapgd2.c
Log:
Added simple line drawing case for GD2.
Modified: trunk/mapserver/mapgd2.c
===================================================================
--- trunk/mapserver/mapgd2.c 2010-02-23 17:44:11 UTC (rev 9885)
+++ trunk/mapserver/mapgd2.c 2010-02-23 18:28:46 UTC (rev 9886)
@@ -275,7 +275,18 @@
free(edge);
}
-void renderLineGD(imageObj *img, shapeObj *p, strokeStyleObj *stroke) {
+void renderLineGD(imageObj *img, shapeObj *p, strokeStyleObj *stroke)
+{
+ int i, j;
+ gdImagePtr ip;
+
+ if(!img || !p || !stroke) return;
+ ip = (gdImagePtr) img->img.plugin;
+
+ if(stroke->color.pen == MS_PEN_UNSET) setPen(ip, &stroke->color);
+ for (i=0; i < p->numlines; i++)
+ for(j=1; j<p->line[i].numpoints; j++)
+ gdImageLine(ip, (int) p->line[i].point[j-1].x, (int) p->line[i].point[j-1].y, (int) p->line[i].point[j].x, (int) p->line[i].point[j].y, stroke->color.pen);
}
void renderPolygonGD(imageObj *img, shapeObj *p, colorObj *c)
More information about the mapserver-commits
mailing list