|
From: <ai...@us...> - 2010-05-03 04:51:57
|
Revision: 10963
http://plplot.svn.sourceforge.net/plplot/?rev=10963&view=rev
Author: airwin
Date: 2010-05-03 04:51:51 +0000 (Mon, 03 May 2010)
Log Message:
-----------
Allow the exact string "NULL" as a pltr argument possibility in the
user-friendly variants of plshade and plshades.
Modified Paths:
--------------
trunk/bindings/tcl/tclAPI.c
Modified: trunk/bindings/tcl/tclAPI.c
===================================================================
--- trunk/bindings/tcl/tclAPI.c 2010-05-03 02:03:13 UTC (rev 10962)
+++ trunk/bindings/tcl/tclAPI.c 2010-05-03 04:51:51 UTC (rev 10963)
@@ -2494,13 +2494,13 @@
* We will be getting data through a 2-d Matrix, which carries along
* nx and ny, so no need for those. Toss defined since it's not supported
* anyway. Toss plfill since it is the only valid choice. Take an optional
- * pltr spec just as for plcont, and add a wrapping specifier, also just as
- * in plcont. So the new command looks like:
+ * pltr spec just as for plcont or an alternative of NULL pltr, and add a
+ * wrapping specifier, as in plcont. So the new command looks like:
*
* plshade z xmin xmax ymin ymax \
* sh_min sh_max sh_cmap sh_color sh_width \
* min_col min_wid max_col max_wid \
- * rect [pltr x y] [wrap]
+ * rect [[pltr x y] | NULL ] [wrap]
\*--------------------------------------------------------------------------*/
static int
@@ -2581,6 +2581,11 @@
argc -= 3, argv += 3;
}
+ else if ( argc && !strcmp( argv[0], "NULL" ) )
+ {
+ pltrname = argv[0];
+ argc -= 1, argv += 1;
+ }
if ( argc )
{
@@ -2597,8 +2602,20 @@
/* Figure out which coordinate transformation model is being used, and setup
* accordingly. */
- if ( !strcmp( pltrname, "pltr0" ) )
+ if ( !strcmp( pltrname, "NULL" ) )
{
+ pltr = NULL;
+ zused = z;
+
+ /* wrapping is only supported for pltr2. */
+ if ( wrap )
+ {
+ interp->result = "Must use pltr2 if want wrapping.";
+ return TCL_ERROR;
+ }
+ }
+ else if ( !strcmp( pltrname, "pltr0" ) )
+ {
pltr = pltr0;
zused = z;
@@ -2743,7 +2760,7 @@
{
Tcl_AppendResult( interp,
"Unrecognized coordinate transformation spec:",
- pltrname, ", must be pltr0 pltr1 or pltr2.",
+ pltrname, ", must be NULL, pltr0, pltr1, or pltr2.",
(char *) NULL );
return TCL_ERROR;
}
@@ -2794,13 +2811,13 @@
* nx and ny, so no need for those. Toss defined since it's not supported
* anyway. clevel will be via a 1-d matrix, which carries along nlevel, so
* no need for that. Toss plfill since it is the only valid choice.
- * Take an optional
- * pltr spec just as for plcont, and add a wrapping specifier, also just as
- * in plcont. So the new command looks like:
+ * Take an optional pltr spec just as for plcont or an alternative of
+ * NULL pltr, and add a wrapping specifier, as in plcont.
+ * So the new command looks like:
*
* plshades z xmin xmax ymin ymax \
* clevel, fill_width, cont_color, cont_width\
- * rect [pltr x y] [wrap]
+ * rect [[pltr x y] | NULL] [wrap]
\*--------------------------------------------------------------------------*/
static int
@@ -2884,6 +2901,11 @@
argc -= 3, argv += 3;
}
+ else if ( argc && !strcmp( argv[0], "NULL" ) )
+ {
+ pltrname = argv[0];
+ argc -= 1, argv += 1;
+ }
if ( argc )
{
@@ -2900,8 +2922,20 @@
/* Figure out which coordinate transformation model is being used, and setup
* accordingly. */
- if ( !strcmp( pltrname, "pltr0" ) )
+ if ( !strcmp( pltrname, "NULL" ) )
{
+ pltr = NULL;
+ zused = z;
+
+ /* wrapping is only supported for pltr2. */
+ if ( wrap )
+ {
+ interp->result = "Must use pltr2 if want wrapping.";
+ return TCL_ERROR;
+ }
+ }
+ else if ( !strcmp( pltrname, "pltr0" ) )
+ {
pltr = pltr0;
zused = z;
@@ -3046,7 +3080,7 @@
{
Tcl_AppendResult( interp,
"Unrecognized coordinate transformation spec:",
- pltrname, ", must be pltr0 pltr1 or pltr2.",
+ pltrname, ", must be NULL, pltr0, pltr1, or pltr2.",
(char *) NULL );
return TCL_ERROR;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|