|
From: Ethan M. <merritt@u.washington.edu> - 2005-08-06 00:31:24
|
On Wednesday 03 August 2005 08:57 am, Petr Mikulik wrote: > > => the the bounding box of the string gets black background on x11. Is it > possible to fix it? Amazingly enough, I think this problem may go away when you remove the conditional coding of PM3D. The underlying problem seems to be that gnuplot_x11 is keeping separate graphics contexts for pm3d and non-pm3d drawing. The color mismatch comes at least sometimes, and maybe always, because of an inconsistent mapping of colors in the two contexts. If we unconditionally support PM3D, then I don't see any need to keep two separate contexts; we can merge all the uses of gc_pm3d back into the main gc. In preliminary testing, this cures the observed bug. By the way -- gplt_x11.c is an example of code where simply removing #ifdef PM3D / #endif brackets is not the way to go. The code inside these brackets is often parallel to, rather than in addition to, the non-PM3D case. Some of this code can be deleted altogether when PM3D does not need to be handled as a special case of something else. For example, the x11.trm/gplt_x11.c communication protocol has two sets of set-linetype commands 'L' and 'l'. They both do basically the same thing except that one is applied to the gc_pm3d and the other to gc. Merge the two gc's and you don't need separate handling routines. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |