[mapserver-commits] r11963 - in branches/branch-6-0/mapserver: . mapscript/php

svn at osgeo.org svn at osgeo.org
Wed Jul 20 09:06:10 EDT 2011


Author: tbonfort
Date: 2011-07-20 06:06:10 -0700 (Wed, 20 Jul 2011)
New Revision: 11963

Modified:
   branches/branch-6-0/mapserver/
   branches/branch-6-0/mapserver/HISTORY.TXT
   branches/branch-6-0/mapserver/mapgd.c
   branches/branch-6-0/mapserver/mapscript/php/
Log:
Fix incorrect rendering of GD lines between 1 and 2 pixels wide (#3962)


Property changes on: branches/branch-6-0/mapserver
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/aboudreault:9103-9193
/sandbox/mapserver6:10108-10742
/trunk/mapserver:11877
   + /sandbox/aboudreault:9103-9193
/sandbox/mapserver6:10108-10742
/trunk/mapserver:11877,11961

Modified: branches/branch-6-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-6-0/mapserver/HISTORY.TXT	2011-07-20 13:02:57 UTC (rev 11962)
+++ branches/branch-6-0/mapserver/HISTORY.TXT	2011-07-20 13:06:10 UTC (rev 11963)
@@ -14,9 +14,8 @@
 
 Current Version (future 6.0.2, SVN branch-6-0):
 ---------------------------
+- Fix incorrect rendering of GD lines between 1 and 2 pixels wide (#3962)
 
-- ...
-
 Version 6.0.1 (2011-07-12):
 ---------------------------
 

Modified: branches/branch-6-0/mapserver/mapgd.c
===================================================================
--- branches/branch-6-0/mapserver/mapgd.c	2011-07-20 13:02:57 UTC (rev 11962)
+++ branches/branch-6-0/mapserver/mapgd.c	2011-07-20 13:06:10 UTC (rev 11963)
@@ -344,14 +344,14 @@
   }
 
   if(stroke->width > 1) {
-     int brush_fc; 
-     brush = gdImageCreate(stroke->width, stroke->width);
+     int brush_fc;
+     brush = gdImageCreate(ceil(stroke->width), ceil(stroke->width));
      gdImageColorAllocate(brush, gdImageRed(ip,0), gdImageGreen(ip, 0), gdImageBlue(ip, 0));
      gdImageColorTransparent(brush,0);
      brush_fc = gdImageColorAllocate(brush, gdImageRed(ip,stroke->color->pen),
            gdImageGreen(ip,stroke->color->pen), gdImageBlue(ip,stroke->color->pen));
-     gdImageFilledEllipse(brush,MS_NINT(stroke->width/2),MS_NINT(stroke->width/2),
-           stroke->width,stroke->width, brush_fc);
+     gdImageFilledEllipse(brush,ceil(stroke->width/2),ceil(stroke->width/2),
+           ceil(stroke->width),ceil(stroke->width), brush_fc);
      gdImageSetBrush(ip, brush);
      if(stroke->patternlength > 0) {
        c = gdStyledBrushed;


Property changes on: branches/branch-6-0/mapserver/mapscript/php
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/aboudreault/mapscript/php3:9103-9193
/sandbox/mapserver6/mapscript/php:10108-10742
/trunk/mapserver/mapscript/php:11877
   + /sandbox/aboudreault/mapscript/php3:9103-9193
/sandbox/mapserver6/mapscript/php:10108-10742
/trunk/mapserver/mapscript/php:11877,11961



More information about the mapserver-commits mailing list