From: Alan W. I. <ir...@be...> - 2016-10-06 07:14:02
|
On 2016-10-05 18:42-0400 Pedro Vicente wrote: > Hi > > > I am trying to change the default black background color using the wxWidgets driver > > If using the SVG driver this can be done as explained here > > https://sourceforge.net/p/plplot/mailman/message/2817799/ > > the trick being calling > > plscolbg() > > before > > plinit(); > Hi Pedro: You are correct. You should be able to specify background colour for all devices if they have been programmed correctly, but it turns out you have found a wxwidgets-related bug. The rest of this is directed to Phil since the wxwidgets-related code is his, and I have verified the bug in perhaps a more standard way than your example. @Phil, will you look into this please? To verify this bug myself, I did the following steps which you should be able to replicate for yourself. * Run cmake with the -DBUILD_TEST=ON option which configures the build of our standard examples. * Build a standard example (the 00 standard example in C in this case, but any other standard example will likely also demonstrate this bug). make x00c * Build several different devices to try. make svg make xwin make wxwidgets wxPLViewer #wxwidgets interacts with wxPLViewer at run time so both have to be built * Run the 00 standard example with different devices and with a blue background specified. (The -bg option is the same as calling plscolbg before plinit in the standard example, and the -bg colour is specified with the standard RRGGBB hexadecimal notation so 0000FF is saturated blue) examples/c/x00c -dev svg -bg 0000FF -o test.svg examples/c/x00c -dev xwin -bg 0000FF examples/c/x00c -dev wxwidgets -bg 0000FF I found that the svg and xwin results had the specified blue background, but the wxPLViewer instance that was automatically launched and communicated with by -dev wxwidgets rendered the background as the default black rather than the specified blue ==> BUG. I don't know if that is a bug in -dev wxwidgets, a bug in the way background colours are communicated to the wxPLViewer instance, and/or a bug in the wxPLViewer code, but I assume you will be readily able to figure this out from your knowledge of each of these components of our wxwidgets-related code. To my mind, the highest priority is to get -dev wxwidgets to work properly with -bg as requested above, but as a much lower priority it would be good to build most of the standard PLplot command-line parsing (likely mostly everything other than -dev and -o) into examples/c++/wxPLplotDemo.cpp so that it would be possible, for example to run examples/c++/wxPLplotDemo -bg 0000FF -geometry -geometry 500x1000 and get the specified blue background and geometry for that example. Just to remind you and others here, please run, e.g., examples/c/x00c -h to get help on all the PLplot options that can be parsed from the command line. 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 __________________________ |