|
From: Maurice L. <mj...@ga...> - 2001-02-24 13:07:20
|
Dean Clamons writes:
> On Sunday, February 18, 2001 1:35 AM, Maurice LeBrun
> [SMTP:mj...@ga...] wrote:
> > The color handling routines in plframe use X11 conventions rather than plplot
> > ones, which is more appropriate for a widget. I.e. it uses XParseColor to
> > convert a string into its 3 rgb components. This lets you use symbolic names
> > or hex notation for color values.
> >
> That seems reasonable, but what is the calling sequence expected by plframe?
> For instance, the C calling sequence for plscmap1 is "plscmap1(r,g,b,ncol)".
> One would then expect the tcl calling sequence to be "plscmap1 r g b ncol".
> That is not what plframe expects. I haven't analyzed exactly what it wants, but
> the first parameter is supposed to be ncol.
The API is illustrated in the (unfortunately not currently working) file
plcolor.tcl. Here are the salient bits:
set cmap0 ""
for {set i 0} {$i < $ncol0} {incr i} {
set cmap0 "$cmap0 $plcmap0_col($i)"
}
$plot.plwin cmd plscmap0 $ncol0 $cmap0
for cmap0, and
set cmap1 ""
for {set i 0} {$i < $ncol1} {incr i} {
set cmap1 \
"$cmap1 $plcmap1_col($i) $plcmap1_pos($i) $plcmap1_rev($i)"
}
$plot.plwin cmd plscmap1 $ncol1 $cmap1
for cmap1. So, it's number of colors followed by a list. Probably I
should've changed the command names to avoid confusion.. oh well.
I've been intending to rewrite the palette tools in itcl but haven't actually
gotten started on it yet.
--
Maurice LeBrun mj...@ga...
|