[Xcircuit-dev] investigate Cvt

Eric Y. Chang ericc at alumni.caltech.edu
Sat May 11 16:45:51 PDT 2002


Hi Tim.  I tried a couple of things, both of which were successful.  The first
was to close Netscape.  The menus looked fine then.  So, this is caused
by running out of colors, since Netscape takes up so many.  Actually, it must
take up some pretty crucial ones, since the page it was open to is the
tutorial, with all the screenshots!  So, one workaround is to close Netscape
every time XCircuit is running, but this is a hassle, since I have to open
it every now and then as I read the tutorial.

The second thing that worked is to just revert the Cvt routine.  That works
just fine, and the old colors come back.  This works even if Netscape is
showing the tutorial.  The reason why it works is that there is one major
difference in the 2.5.4 code.  If a non-zero code is returned from the
color lookup, the 2.3.3 code will call findanothercolor (or something
like that).  This will build a private color table, and every subsequent
call to Cvt will succeed rather than leaving the pixel member un-initialized.
Obviously, the line was taken out for a reason, but I cannot figure out
why.  If there is a non-zero return code, .pixel should still be set, or
else who knows what its value will be.  This might even give a memory
error.

I will also try moving XtAppAddConverter up, but I don't see how this
will help, especially since I am not sure how this routine works.  I am
not very fluent in Xt.

Eric

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth at sourceforge.net
_______________________________________________
Xcircuit-dev mailing list
Xcircuit-dev at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcircuit-dev



More information about the Xcircuit-dev mailing list