|
From: Jun T. <tak...@kb...> - 2015-08-07 16:47:11
|
aqua terminal can't plot the last demo from polar.dem correctly. (see the attached aqua2.pdf and qt2.pdf). A simple command to reproduce the problem is gnuplot> set style fill solid 0.5 gnuplot> plot sin(x) with filledcurve above y=0.0 i.e., filledcurve doesn't work if the fillstyle has density != 1.0. The problem is in AQUA_filled_polygon() (in aquaterm.trm). The original color is saved at line 695, but the color is not restored to this saved color. In the patch below, I copied 5 lines of code from the end of AQUA_boxfill() to the end of AQUA_filled_polygon(), so that the color is restored to the original color. # The reason that the small circle at the center of aqua2.pdf is # black is the same as in my previous post: # 'set key opaque' in aqua terminal # http://sourceforge.net/p/gnuplot/mailman/message/34305384/ # The patch for this is also included (again) in the patch below. Index: term/aquaterm.trm =================================================================== RCS file: /cvsroot/gnuplot/gnuplot/term/aquaterm.trm,v retrieving revision 1.52 diff -u -r1.52 aquaterm.trm --- term/aquaterm.trm 25 Feb 2015 00:23:14 -0000 1.52 +++ term/aquaterm.trm 7 Aug 2015 04:55:25 -0000 @@ -387,7 +387,7 @@ * Set up the basic indexed colormap for gnuplot */ /* Special colors */ - [adapter setColormapEntry:0 red:0.1 green:0.1 blue:0.1]; /* linetype -4 */ + [adapter setColormapEntry:0 red:1.0 green:1.0 blue:1.0]; /* linetype -4 */ [adapter setColormapEntry:1 red:0.9 green:0.9 blue:0.9]; /* linetype -3 (xor;interactive) light gray */ [adapter setColormapEntry:2 red:0.0 green:0.0 blue:0.0]; /* linetype -2 (border) black */ [adapter setColormapEntry:3 red:0.8 green:0.8 blue:0.8]; /* linetype -1 (gridlines) light grey */ @@ -737,6 +737,12 @@ [adapter addEdgeToVertexPoint:NSMakePoint(corners[i].x/AQUA_RESOLUTION, corners[i].y/AQUA_RESOLUTION)]; } + + /* Restore color */ + if (AQUA_hasAlphaSupport) + [adapter setColorRed:r green:g blue:b alpha:a]; + else + [adapter setColorRed:r green:g blue:b]; } TERM_PUBLIC void |