From: Alan W. I. <ir...@be...> - 2012-01-20 19:25:35
|
On 2012-01-20 03:32-0800 phil rosenberg wrote: > Sorry for the multiple emails today. > > I have been looking at removing references to cmap0 and cmap1 in wxwidgets. I noticed that in plplotP.h the switches for state function > calls include PLSTATE_COLOR1 and PLSTATE_COLOR2 and there are apropriate functions in the wxWidgets drivers to deal with these. I'm not > sure what the appropriate driver response should be to these calls. Should it be to set the driver's internal colour from cmap0/cmap1 > or set it from curcolor? curcolor. To explain that further, qt.cpp is one of our most well-maintained device drivers. If you look at the various plD_state_* functions in qt.cpp, you will see code like this: case PLSTATE_COLOR0: ( (QtPLDriver *) widget )->QtPLDriver::setColor( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ); break; case PLSTATE_COLOR1: ( (QtPLDriver *) widget )->QtPLDriver::setColor( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ); break; i.e., curcolor is used for both. I have also reviewed some of our other drivers and the large majority of them use curcolor. Some use the above PLSTATE_COLOR0 and PLSTATE_COLOR1 method while others (e.g. svg.c and cairo.c) ignore that and simply use curcol from the PLStream state. So I suggest you use curcolor with wxwidgets as well. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ |