From: <hez...@us...> - 2011-04-17 21:59:14
|
Revision: 11707 http://plplot.svn.sourceforge.net/plplot/?rev=11707&view=rev Author: hezekiahcarty Date: 2011-04-17 21:59:08 +0000 (Sun, 17 Apr 2011) Log Message: ----------- Add cmap1_min and cmap1_max attributes to the PLStream structure These values are intended for use by the continuous plot functions such as plshades, plimage, etc. They can be used to restrict the range of colors used by these functions to a subset of color map 1. Modified Paths: -------------- trunk/include/plstrm.h trunk/src/plcore.c Modified: trunk/include/plstrm.h =================================================================== --- trunk/include/plstrm.h 2011-04-15 18:11:24 UTC (rev 11706) +++ trunk/include/plstrm.h 2011-04-17 21:59:08 UTC (rev 11707) @@ -125,6 +125,8 @@ // tmpcolor RGB[] Temporary color storage // cmap0 RGB[] Color map 0: maximum of ncol0 RGB 8-bit values // cmap1 RGB[] Color map 1: maximum of ncol1 RGB 8-bit values +// cmap1_min PLFLT Minimum color map 1 color to use in continuous tone plots +// cmap1_max PLFLT Maximum color map 1 color to use in continuous tone plots // //-------------------------------------------------------------------------- // @@ -542,6 +544,8 @@ PLINT icol0, ncol0, icol1, ncol1, ncp1, curcmap; + PLFLT cmap1_min, cmap1_max; + PLColor curcolor, tmpcolor; PLColor *cmap0; PLColor *cmap1; Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2011-04-15 18:11:24 UTC (rev 11706) +++ trunk/src/plcore.c 2011-04-17 21:59:08 UTC (rev 11707) @@ -2592,6 +2592,10 @@ if ( plsc->cmap1 == NULL ) plspal1( "", TRUE ); + + // Set continuous plots to use the full color map 1 range + plsc->cmap1_min = 0.0; + plsc->cmap1_max = 1.0; } plsc->psdoc = NULL; @@ -2704,6 +2708,8 @@ plsc->icol1 = plsr->icol1; plsc->ncol1 = plsr->ncol1; + plsc->cmap1_min = plsr->cmap1_min; + plsc->cmap1_max = plsr->cmap1_max; if ( plsc->cmap1 != NULL ) free( (void *) plsc->cmap1 ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |