[mapserver-commits] r11961 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Jul 20 08:58:53 EDT 2011
Author: tbonfort
Date: 2011-07-20 05:58:53 -0700 (Wed, 20 Jul 2011)
New Revision: 11961
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapgd.c
Log:
Fix incorrect rendering of GD lines between 1 and 2 pixels wide (#3962)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-07-19 16:00:35 UTC (rev 11960)
+++ trunk/mapserver/HISTORY.TXT 2011-07-20 12:58:53 UTC (rev 11961)
@@ -14,6 +14,8 @@
Current Version (SVN trunk, 6.1-dev, future 6.2):
-------------------------------------------------
+- Fix incorrect rendering of GD lines between 1 and 2 pixels wide (#3962)
+
- Add gamma correction to AGG polygon rendering (#3165)
- Initialize the scalebar image color to transparent by default (#3957)
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2011-07-19 16:00:35 UTC (rev 11960)
+++ trunk/mapserver/mapgd.c 2011-07-20 12:58:53 UTC (rev 11961)
@@ -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;
More information about the mapserver-commits
mailing list