On 2009-08-22 17:25-0700 Jerry wrote:

>
> On Aug 22, 2009, at 2:05 PM, Alan W. Irwin wrote:
>
>> Once plscmap0n(0) gives default colours like before, I suspect all
>> the Ada
>> red issues will go away.  Jerry has remarked before that our Ada
>> bindings do
>> their own colour initialization, and my guess is that boils down in
>> the
>> cmap0 case to a call to plscmap0n(0).
>
>
> I didn't absorb all of what Alan wrote on my first and second quick
> readings, but here is what happens in the Ada initialization.
>
> The Ada binding, when initializing package plplot.adb or
> plplot_traditional.adb, makes several calls to plgcol0 as part of the
> color map 0 snapshot function--an initial snapshot is taken so that
> the user can later restore the initial colors if desired. No other
> calls are made. These calls to plgcol0 take place before plinit (which
> is normally called from the user program, after Ada package
> initialization).

Hi Jerry:

Thanks for that explanation which confirms my guess above.   If you look
at the plgcol0 implementation in plctrl.c, it's first two statements are

if (plsc->cmap0 == NULL)
    plscmap0n(0);

Therefore, the Ada bindings assume (indirectly via plgcol0) that plscmap0n
initializes defaults for colour values before plinit is called. Presumably,
some existing user code makes the same assumption since plscmap0n has long
had this capability.  Recent changes to svn trunk inadvertently dropped that
capability, but Hez's patch restores it which explains why I found that
patch fixes the Ada colour initialization problems.

I felt there were other issues with that patch, but as soon as Hez and I get
together on that (hopefully today if Hez is in e-mail contact this weekend),
all should be well again on svn trunk for Ada (and user) colour
initialization that occurs prior to plinit.

Alan
__________________________
Alan W. Irwin

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 libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to