|
From: Petr M. <mi...@ph...> - 2005-08-07 09:48:30
|
> Amazingly enough, I think this problem may go away when you remove the
> conditional coding of PM3D.
Let's see. I've just committed the removal.
> 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.
Could you please make this "unification"?
There is yet another code which looks "suspictious" to me, because it was
formerly surrounded by #if defined(PM3D) && defined(USE_MOUSE):
gplt_x11.c, line 5039:
#ifdef USE_MOUSE
{
/* create the xor GC just for allocating the xor value
* before a palette is created. This way the xor foreground
* will be available. */
AllocateXorPixel(cmap_ptr);
}
#endif
}
---
PM
|