|
From: Alan W. I. <ir...@be...> - 2004-11-13 17:36:02
|
On 2004-11-13 08:15-0800 Alan W. Irwin wrote:
> On 2004-11-13 00:50-0600 mj...@ga... wrote:
>
>>
>> As for the widget command syntax, it's:
>>
>> <widget> scol0 <i> <color>
>>
>> where <color> is any form suitable to XParseColor().
>>
>> E.g. from plframe.c --
>>
>> if ( ! XParseColor(plFramePtr->display,
>> Tk_Colormap(plFramePtr->tkwin), col, &xcol)) {
>> Tcl_AppendResult(interp, "Couldn't parse color ", col,
>> (char *) NULL);
>> return TCL_ERROR;
>> }
>
> Is this interpretation also correct for the pure tcl case, i.e., when
> you aren't using X and you are using, for example, the postscript device?
I just looked a bit further into this, and plscol0 appears to be defined
properly in bindings/tcl/tclgen.c to take 4 character arguments which are
converted to integers using atoi. And if it doesn't have 4 arguments it
complains. So this gets curiouser and curiouser since 4 arguments
apparently do not work and the construct (with two arguments)
.f cmd plscol0 0 white
does work. I presume this is one of those cases (which I thought we had
sorted out some time ago) where there is a nameclash so the tcl API in
tclgen.c is hijacked with something else.
Maurice, once you figure this out, I hope you change things so for all
commands in the tcl interface (and also for the separate plframe interface
that is nameclashing with it) a single-colour argument like "white" is
accepted (since that is useful) as well as the 3-argument (r g b) form
(since that is the expected form if you generalize from the C API).
Alan
__________________________
Alan W. Irwin
email: ir...@be...
phone: 250-727-2902
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
|