|
From: Ethan M. <merritt@u.washington.edu> - 2007-01-10 19:02:33
|
On Wednesday 10 January 2007 03:39, Daniel J Sebald wrote:
> Ethan A Merritt wrote:
> > On Tuesday 09 January 2007 19:19, Daniel J Sebald wrote:
> >
> >> The demo "transparent_solids.dem" produces color differences
> >> between X11 and PostScript.
> >
> >
> > Well, since neither x11 nor postscript support transparency...
>
> > Should non-supporting terminals fall back to something in particular if transparency is not possible?
> > What, exactly?
>
> Falling back on something is fine, but it should be consistent across terminals.
Let me explain the two possibilities I see for a driver that cannot handle transparency.
(1) Pretend that the style is
"fillstyle solid <density>"
rather than
"fillstyle transparent solid <opacity>"
This is what the PostScript driver is doing. It makes the pair of tori look very pale,
because instead of a mostly transparent surface (opacity=30%) it renders a surface
that is at most 30% saturated with the fullscale color from the colorbar
(2) Ignore the opacity value altogether, yielding full-scale color with no transparency.
I don't think any of the drivers are doing this at the moment, but it would be easy
enough to change.
> I would think in this case that if x11 behaved the same as PostScript
> (i.e., the same color elements, but just not the transparency) would be fine.
That was the intent. There may be a bug.
> Were you trying to implement transparency in X11?
> Or will that come once the alpha-channel mechanics are there?
I think that implementing transparency on top of X11 is such a hard problem that it would
require a whole graphics project in its own right. And in fact such projects exist. Two
obvious ones we could use are OpenGL, for which prototype gnuplot drivers have been
explored, and wxWidgets, for which we now have a fully developed driver.
So as I see it, the current best answer to "How can I use transparency with x11?"
is "Use the wxt terminal"!
|