|
From: <ai...@us...> - 2009-09-17 01:56:36
|
Revision: 10418
http://plplot.svn.sourceforge.net/plplot/?rev=10418&view=rev
Author: airwin
Date: 2009-09-17 01:56:26 +0000 (Thu, 17 Sep 2009)
Log Message:
-----------
Fix -bg bug by actually using (!) colours read in by cmap0_palette_read
in plcmap0_def. Thanks to Mark de Wever for reporting this issue.
Modified Paths:
--------------
trunk/src/plctrl.c
Modified: trunk/src/plctrl.c
===================================================================
--- trunk/src/plctrl.c 2009-09-16 15:22:05 UTC (rev 10417)
+++ trunk/src/plctrl.c 2009-09-17 01:56:26 UTC (rev 10418)
@@ -836,7 +836,8 @@
/*--------------------------------------------------------------------------*\
* plcmap0_def()
*
- * Initializes specified color map 0 color entry to its default.
+ * Initializes specified color map 0 color entry to its default for
+ * index range from imin to imax.
\*--------------------------------------------------------------------------*/
void
@@ -847,6 +848,9 @@
int number_colors;
if(imin <= imax) {
cmap0_palette_read("", &number_colors, &r, &g, &b, &a);
+ for (i = imin; i <= MIN((number_colors-1),imax); i++)
+ color_def(i, r[i], g[i], b[i], a[i],
+ "colors defined by default cmap0 palette file");
free(r);
free(g);
free(b);
@@ -860,7 +864,7 @@
to opaque red as a warning. */
for (i = MAX(number_colors, imin); i <= imax; i++)
color_def(i, 255, 0, 0, 1.0,
- "opaque red to mark not defined by palette file");
+ "opaque red colour to mark not defined by palette file");
}
/*--------------------------------------------------------------------------*\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|