On Wed, May 04, 2011 at 01:11:43PM -0700, Alan Irwin wrote: > On 2011-05-04 19:41+0100 Andrew Ross wrote: > >> >> Alan, >> >> A simple change - now committed. Other devices explicitly set the >> background colour with each call to plD_bop_xw. Incidentally the >> old version worked with the -db option (double buffering) since >> the buffer pixmap was set to the background colour for each page, >> but the non-buffered version didn't work as in this case the >> background colour wasn't being set for each page. The xwin fix also >> fixes the tk device. > > Hi Andrew: > > Thanks for solving the principal issue. However, the fix is still not > quite right. If you use the -colorbar option and resize page 4 (the > last of the pllegend pages, but not the earlier ones), then the > background colour changes incorrectly to green. This also happens for > -dev wxwidgets, but doesn't happen, e.g, for -dev xcairo or -dev > qtwidget. > > So it is likely there is some difference in style between how colours > are handled for resizes between the xwin and wxwidgets interactive > devices on the one hand and the xcairo and qtwidget devices on the > other. > > BTW, I am using the wxGC version of the wxwidgets device just in > case that matters.
Hm. Well it seems that xwin code has some "quirks" to it. Currently the resize / redraw code calls plD_bop_xw to reset the page. This seems an overkill, for example it increases the page count. The problem is that it resets the background to the current background colour rather than the one originally used to produce the page (as you spotted). The code now caches the background colour at the start of the page and uses this for redraws / resizes. It seems to work ok for me. A further quirk that has come to light is that the xwin driver actually uses a single colourmap for all windows / streams, whereas plplot has individual colourmaps for each stream. This is only an issue if you have multiple windows and change the colours. I suspect this "feature" was initially for 8-bit displays and avoids the annoying flashing colours when you switched windows (anyone still remember that?) These days it is probably not really an issue. I'm tempted to clean this up to make a per stream colourmap. Any strong opinions? I've never actually encountered this problem, but I imagine for interactive use like octave it could potentially be an issue. Andrew ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel