From: <ar...@us...> - 2007-05-21 13:23:33
|
Revision: 7692 http://plplot.svn.sourceforge.net/plplot/?rev=7692&view=rev Author: aroach Date: 2007-05-21 06:23:35 -0700 (Mon, 21 May 2007) Log Message: ----------- Fixed up the bug with the GD driver which stopped it working with recent versions of GD and no freetype. To do this, I stopped overloading the "-drvopt smooth" variable (which had to be set to "2" before to activate smoothed lines) and added a unique variable, "-drvopt smoothlines" to activate line anti aliasing. Modified Paths: -------------- trunk/drivers/gd.c Modified: trunk/drivers/gd.c =================================================================== --- trunk/drivers/gd.c 2007-05-20 17:17:39 UTC (rev 7691) +++ trunk/drivers/gd.c 2007-05-21 13:23:35 UTC (rev 7692) @@ -108,9 +108,9 @@ * way of making a nice web-friendly png without having to redefine the * cmaps within your program. * - * smooth + * smoothlines * - * -drvopt smooth=2 turns on anti-aliased line and polygong drawing if + * -drvopt smoothlines=1 turns on anti-aliased line and polygong drawing if * you are using a 24bit mode. Unfortunately gd doesn't honour line * width when anti-aliasing, so by default it is off. */ @@ -364,6 +364,7 @@ #if GD2_VERS >= 2 static int truecolour=0; static int palette=0; + static int smooth_line=0; #endif #ifdef HAVE_FREETYPE static int freetype=1; @@ -377,6 +378,7 @@ #if GD2_VERS >= 2 {"8bit", DRV_INT, &palette, "Palette (8 bit) mode"}, {"24bit", DRV_INT, &truecolour, "Truecolor (24 bit) mode"}, + {"smoothlines", DRV_INT, &smooth_line, "Turn line Anti Aliasing on (1) or off (0)"}, #endif #ifdef HAVE_FREETYPE {"text", DRV_INT, &freetype, "Use driver text (FreeType)"}, @@ -429,7 +431,7 @@ NCOLOURS=16777216; } - if ((dev->palette==0)&&(dev->optimise==0)&&(smooth_text>1)) dev->smooth=1; /* Allow smoothing of lines if we have a truecolour device */ + if ((dev->palette==0)&&(dev->optimise==0)&&(smooth_line==1)) dev->smooth=1; /* Allow smoothing of lines if we have a truecolour device */ #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |