Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-18 Thread Hezekiah M. Carty
On Thu, Mar 18, 2010 at 5:34 PM, Alan W. Irwin
ir...@beluga.phys.uvic.ca wrote:
 On 2010-03-18 16:26-0400 Hezekiah M. Carty wrote:


 [...] From what I have read so
 far, having nicely window-manager independent transparent backgrounds
 for the xcairo (and xwin and possiblt qtwidget) devices would require
 pulling in more X dependencies and would only work with window
 managers which support such niceties.

 I read some stuff like that as well on the web, but I think it must be quite
 dated information.  To show this, note that the ImageMagick display
 application is a GUI that ultimately interacts with the X server on Linux.

 Now that -dev pngcairo is working properly, you can test whether your X
 server renders transparent backgrounds by running

 examples/c/x02c -dev pngcairo -bg ff_0.3 -fam -o test.png

 followed by

 display -immutable test.png.2

 In my case I have access to two different X servers for two very different
 boxes.  I use the Debian Lenny X server/kernel 2.6.26 for my newish Intel
 box with g33 chipset/gma 3100 and the Debian Testing X server/kernel 2.6.32
 with my old shuttle box (the X-terminal) with embedded SiS hardware with
 reverse-engineered 2D X driver.  In both cases, I get transparent results
 with display -immutable.  David had similar success with display
 -immutable, although in his case display might be interacting with something
 different than X (glitz?), but at minimum his result showed that transparent
 backgrounds can be properly rendered on Mac OS X.

 [out of order]
 Should I back-out the xcairo device change [to insert an obscuring layer
 between pages]?

 Yes, please.  Of course, you first have to figure out a way to not stack
 xcairo pages on top of previous pages.  I was thinking along the lines that
 when a page was started the widget/GUI associated with the previous page
 should be properly terminated and a whole new widget/GUI initialized for the
 new page.  But maybe you would not have to go to that extreme...


I think we may be talking about two different kinds of transparency
here, or I am using a differently configured version of imagemagick
(6.5.1.0-1.1ubuntu3).  Do you mean transparent backgrounds as in (a)I
can watch a movie in the window under my translucent plot! or (b)I
see a checkerboard pattern through my plot, but not the windows
underneath it?  In the case of (a), which some applications support
(for example, recent versions of the Gnome terminal support this), the
xcairo device would have to pull in some extra outside support from X
libraries.  For (b), no special X support is required, we would just
have to change the xcairo device to draw some sort of checkboard
pattern at the start of each plot page, like Gnome's eog or
imagemagick's display does when displaying an image with a transparent
background.

For (b), the only change from the current situation is that the user
would get a checkboard pattern under their plot rather than a plain
white background.

Hez

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-18 Thread Alan W. Irwin
On 2010-03-18 17:55-0400 Hezekiah M. Carty wrote:

 On Thu, Mar 18, 2010 at 5:34 PM, Alan W. Irwin
 ir...@beluga.phys.uvic.ca wrote:
 On 2010-03-18 16:26-0400 Hezekiah M. Carty wrote:


 [...] From what I have read so
 far, having nicely window-manager independent transparent backgrounds
 for the xcairo (and xwin and possiblt qtwidget) devices would require
 pulling in more X dependencies and would only work with window
 managers which support such niceties.

 I read some stuff like that as well on the web, but I think it must be quite
 dated information.  To show this, note that the ImageMagick display
 application is a GUI that ultimately interacts with the X server on Linux.

 Now that -dev pngcairo is working properly, you can test whether your X
 server renders transparent backgrounds by running

 examples/c/x02c -dev pngcairo -bg ff_0.3 -fam -o test.png

 followed by

 display -immutable test.png.2

 In my case I have access to two different X servers for two very different
 boxes.  I use the Debian Lenny X server/kernel 2.6.26 for my newish Intel
 box with g33 chipset/gma 3100 and the Debian Testing X server/kernel 2.6.32
 with my old shuttle box (the X-terminal) with embedded SiS hardware with
 reverse-engineered 2D X driver.  In both cases, I get transparent results
 with display -immutable.  David had similar success with display
 -immutable, although in his case display might be interacting with something
 different than X (glitz?), but at minimum his result showed that transparent
 backgrounds can be properly rendered on Mac OS X.

 [out of order]
 Should I back-out the xcairo device change [to insert an obscuring layer
 between pages]?

 Yes, please.  Of course, you first have to figure out a way to not stack
 xcairo pages on top of previous pages.  I was thinking along the lines that
 when a page was started the widget/GUI associated with the previous page
 should be properly terminated and a whole new widget/GUI initialized for the
 new page.  But maybe you would not have to go to that extreme...


 I think we may be talking about two different kinds of transparency
 here, or I am using a differently configured version of imagemagick
 (6.5.1.0-1.1ubuntu3).  Do you mean transparent backgrounds as in (a)I
 can watch a movie in the window under my translucent plot! or (b)I
 see a checkerboard pattern through my plot, but not the windows
 underneath it?

For my two X servers

display -immutable test.png.2

gives me (a), i.e., a semi-transparent view where I can see the desktop
underneath the image.

If I drop the immutable option, then display gives me (b), i.e., a
checkerboard background.

Do you get (a) or (b) for display --immutable test.png.2 with your X
server? If (b), what X server is that?

 In the case of (a), which some applications support
 (for example, recent versions of the Gnome terminal support this), the
 xcairo device would have to pull in some extra outside support from X
 libraries.

If that is correct, then all we have to do is follow how display (or
more likely its plug-in for displaying PNG's) and Gnome terminal are linked.
This may not actually be an issue since our build system uses
the CMake find_package(X11) command to find the X libraries, and this
issue may have already been addressed by CMake.

 For (b), no special X support is required, we would just
 have to change the xcairo device to draw some sort of checkboard
 pattern at the start of each plot page, like Gnome's eog or
 imagemagick's display does when displaying an image with a transparent
 background.

I guess that answers my question above about what display -immutable does
for your X server.  Here (for two different X servers), eog always produces
a checkerboard pattern, but display only does that without the -immutable
option (or if the example is too large).  For a png that fits on the page,
display -immutable produces (a) here.

Ideally, I think we want to implement both (a) and (b) results under control
of the PLplot user.

So I think the development steps should be in the following order.

(1)  Remove the obscuring layer and unstack the pages so the previous
pages don't interfere with the current page's transparent background
results.  This change just makes sense regardless of the next steps.

(2) See if (a) can be made to work.  I notice in cairo.c there are still
references to RGB24 rather than ARGB32 so that may be a trivial fix.  On the
other hand if one of us does the remaining ARGB32 conversions we might end
up with a checkerboard by default (depending on how X is initialized) if
that checkerboard is being supplied by X (see next comment).  I can try the
ARGB32 conversion myself here with my two different X servers once (1) is
completed by somebody more knowledgeable about cairo.c than I am.

(3) Implement (b) (probably as the default with (a) optional) if necessary.
However, since the checkerboard seems to be the same for both convert
(without -immutable) and eog, I wonder if that 

Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-18 Thread Hazen Babcock
Alan W. Irwin wrote:
 
 For my two X servers
 
 display -immutable test.png.2
 
 gives me (a), i.e., a semi-transparent view where I can see the desktop
 underneath the image.

This is slightly off topic, but this effect really doesn't seem to work
that well on Gnome, at least for me.

This plot has a completely opaque background:
./examples/c/x01c -dev pngcairo -bg FF_0.6 -o ex1.png
display -immutable ex1.png

This plot has a completely transparent background:
./examples/c/x01c -dev pngcairo -bg FF_0.4 -o ex1.png
display -immutable ex1.png

This plot is also completely opaque:
./examples/c/x01c -dev svgcairo -bg FF_0.2 -o ex1.svg
display -immutable ex1.svg

As is this plot:
./examples/c/x01c -dev svg -bg FF_0.2 -o ex1.svg
display -immutable ex1.svg

I'm running GNOME 2.41.1 / ubuntu 8.10.

Even further off topic, the effect is not that great with the terminal
program either. It seems to handle a variable transparency background
but you will always see the desktop background, even if there is
something else (window, icon, etc) underneath it.

So, while I agree that we should support this feature I don't think it
is going to be that cool for most linux users for a while yet.

-Hazen


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-18 Thread David MacMahon
Hi, Hez,

On Mar 18, 2010, at 21:16 , Hezekiah M. Carty wrote:

 The checkerboard background seems to be a semi-standard approach for
 viewing transparent images (Gimp uses something similar).  I'm not
 sure it is a good idea for our interactive devices though, as it makes
 it very difficult to see the details of a plot.  I would prefer to
 keep the white background as the standard for non-transparent windows
 as it maintains better readability.

I agree that a checkerboard (or even transparent) back-background  
makes it harder to see the details of a plot with a non-opaque  
background on interactive devices, but I think one use case for even  
requesting a non-opaque background on an interactive device in the  
first place is to preview how different alpha values would look on a  
non-interactive device.  In this case, some type of patterned back- 
background (e.g. a checkerboard) would be more useful than a single  
color background, IMHO.

If one is primarily interested in actually visualizing data on an  
interactive device (oh, what a concept! :-)), one would probably  
choose to use the default opaque background.

Dave


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-18 Thread Hezekiah M. Carty
On Thu, Mar 18, 2010 at 7:31 PM, Alan W. Irwin
ir...@beluga.phys.uvic.ca wrote:
 On 2010-03-18 17:55-0400 Hezekiah M. Carty wrote:

 On Thu, Mar 18, 2010 at 5:34 PM, Alan W. Irwin
 ir...@beluga.phys.uvic.ca wrote:

 On 2010-03-18 16:26-0400 Hezekiah M. Carty wrote:


 [...] From what I have read so
 far, having nicely window-manager independent transparent backgrounds
 for the xcairo (and xwin and possiblt qtwidget) devices would require
 pulling in more X dependencies and would only work with window
 managers which support such niceties.

 I read some stuff like that as well on the web, but I think it must be
 quite
 dated information.  To show this, note that the ImageMagick display
 application is a GUI that ultimately interacts with the X server on
 Linux.

 Now that -dev pngcairo is working properly, you can test whether your X
 server renders transparent backgrounds by running

 examples/c/x02c -dev pngcairo -bg ff_0.3 -fam -o test.png

 followed by

 display -immutable test.png.2

 In my case I have access to two different X servers for two very
 different
 boxes.  I use the Debian Lenny X server/kernel 2.6.26 for my newish Intel
 box with g33 chipset/gma 3100 and the Debian Testing X server/kernel
 2.6.32
 with my old shuttle box (the X-terminal) with embedded SiS hardware with
 reverse-engineered 2D X driver.  In both cases, I get transparent results
 with display -immutable.  David had similar success with display
 -immutable, although in his case display might be interacting with
 something
 different than X (glitz?), but at minimum his result showed that
 transparent
 backgrounds can be properly rendered on Mac OS X.

 [out of order]
 Should I back-out the xcairo device change [to insert an obscuring layer
 between pages]?

 Yes, please.  Of course, you first have to figure out a way to not stack
 xcairo pages on top of previous pages.  I was thinking along the lines
 that
 when a page was started the widget/GUI associated with the previous page
 should be properly terminated and a whole new widget/GUI initialized for
 the
 new page.  But maybe you would not have to go to that extreme...


 I think we may be talking about two different kinds of transparency
 here, or I am using a differently configured version of imagemagick
 (6.5.1.0-1.1ubuntu3).  Do you mean transparent backgrounds as in (a)I
 can watch a movie in the window under my translucent plot! or (b)I
 see a checkerboard pattern through my plot, but not the windows
 underneath it?

 For my two X servers

 display -immutable test.png.2

 gives me (a), i.e., a semi-transparent view where I can see the desktop
 underneath the image.

 If I drop the immutable option, then display gives me (b), i.e., a
 checkerboard background.

 Do you get (a) or (b) for display --immutable test.png.2 with your X
 server? If (b), what X server is that?


Using Ubuntu 9.10, Xorg 7.4 on an Intel 965GM with Gnome with the
Compiz composited window manager (3D acceleration, transparent
windows, etc) I get (b) for both uses of display.  Using the Gnome
terminal's transparency, I get true transparency with other windows,
etc. showing up underneath.

 I guess that answers my question above about what display -immutable does
 for your X server.  Here (for two different X servers), eog always produces
 a checkerboard pattern, but display only does that without the -immutable
 option (or if the example is too large).  For a png that fits on the page,
 display -immutable produces (a) here.


On my desktop both eog and display show the same checkerboard pattern.
 This pattern, I am almost completely certain, is provided by the
application and not something intrinsic to X.

 Ideally, I think we want to implement both (a) and (b) results under control
 of the PLplot user.

 So I think the development steps should be in the following order.

 (1)  Remove the obscuring layer and unstack the pages so the previous
 pages don't interfere with the current page's transparent background
 results.  This change just makes sense regardless of the next steps.


The obscuring layer is required to keep the previous plot pages from
showing through to the new plot pages.  The other option is to
repeatedly open new windows for each page, but I think that it would
be better to allow the user to create multiple windows by just
creating multiple plot streams.  New pages within a plot stream would
continue to show up in the same window.

 (2) See if (a) can be made to work.  I notice in cairo.c there are still
 references to RGB24 rather than ARGB32 so that may be a trivial fix.  On the
 other hand if one of us does the remaining ARGB32 conversions we might end
 up with a checkerboard by default (depending on how X is initialized) if
 that checkerboard is being supplied by X (see next comment).  I can try the
 ARGB32 conversion myself here with my two different X servers once (1) is
 completed by somebody more knowledgeable about cairo.c than I am.


This is where extra X work is 

Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread Alan W. Irwin
On 2010-03-14 11:32-0700 Alan W. Irwin wrote:

 On 2010-03-14 10:50-0500 Hezekiah M. Carty wrote:
 Revision 10866 should fix this.  If the background color has an alpha
 value  1.0 then a white surface is drawn before the transparent
 background color.  This produces good looking results for all of the
 Cairo devices on my system (Ubuntu 9.10, Cairo 1.8.8).

 This fix obscures the underlying layers as advertised so stops the leaking
 through of the first page onto the second.  However, I don't like this way
 of dealing with the issue (which from your comments, qtwidget uses as well).

 We want transparent backgrounds to be transparent because we would like to
 implement the absolutely cool effect of seeing the plot superimposed on the
 desktop underneath the GUI.

I researched the goal of having semi-transparent backgrounds under
complete PLplot control some more using -dev pngcairo (since that file device
implementation is simpler than xcairo).

./x01c -dev pngcairo -bg ff_0.0 -o test.png -drvopt set_background=1

should produce a white but completely transparent PLplot background if
the the pango/cairo stack of libraries has been initialized properly.
However, it produces a black completely opaque background instead.
(Removing the -drvopt option or setting set_background=0 gives
identical results which seems to be contradictory with the code which
appears to do different things about setting the background depending
on set_background).

I can use ImageMagick to replace all black colours with complete
transparency like this:

convert -transparent black test.png test_transparent.png

Then display -immutable test_transparent.png

really does show the desktop underneath the plot which indeed is a
really cool-looking effect.

(Without that -immutable option, display replaces a transparent background
with a checkerboard background which apparently is something of an industry
standard to signal you really do have a transparent background.) eog also
renders a checkerboard background for test_transparent.png, but in that case
there doesn't seem to be any equivalent of the -immutable option to allow
you to see the unmodified image with an actual transparent background.

It appears from this additional research that all we need to realize the
goal of a transparent background completely under PLplot control for cairo
file devices like pngcairo is a way to initialize the pango/cairo libraries
so they do not impose a black background of their own.  And similarly for
xcairo once the issue of reinitializing the surface for each page is
addressed.  An additional question is why set_background=1 or 0 seems
to produce an identical plot.

I also did similar tests for -dev pngqt with identical results (a black
background is imposed underneath the plot which can be made transparent by
convert) so something similar has to be done in the qt file devices case and
also in the qtwidget case to get rid of the extra backgrounds that are being
imposed below the PLplot background.

Finally, I did some tests using -dev svg, -dev svgcairo, and -dev/svgqt.  In
the case of SVG results the files are in human-readable XML form so it is
easy to confirm these three devices (with no external library, with the
pango/cairo libraries, and the Qt libraries) are all doing the right thing
without imposing any additional layers.  (eog confirmed these good results
by giving a checkboard background signaling there was actually a transparent
background.  ImageMagick display or display -immutable could not confirm
these good results but apparently that is a bug in how display ignores
transparent *.svg results on my platform).

Hopefully these good svg transparent background results for the cases of
-dev svgcairo and -dev svgqt will inspire the cairo and qt experts here to
solve the remaining transparent background issues for the non-svg cairo and
qt devices.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread David MacMahon

On Mar 15, 2010, at 14:32 , Alan W. Irwin wrote:

 Then display -immutable test_transparent.png

 really does show the desktop underneath the plot which indeed is a
 really cool-looking effect.

Using a very recent ImageMagick (6.6.0), display gives me the  
checkerboard background without the -immutable option and a black  
background with that option when looking at an image with a  
transparent background.  This might be an X server limitation or  
window manager limitation, but it shows that this feature is not  
universally available.

 (Without that -immutable option, display replaces a transparent  
 background
 with a checkerboard background which apparently is something of an  
 industry
 standard to signal you really do have a transparent background.)

I agree that this *can be* a really cool-looking effect, but IMHO it  
can also be a really annoying/confusing looking effect (depending on  
what's underneath/behind).  I think it would be nice to provide the  
user the ability to choose how transparent backgrounds are rendered  
(i.e. either see-through to windows underneath/behind or use a  
predefined opaque background, e.g. checkerboard).

Dave


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread Hazen Babcock
David MacMahon wrote:
 
 (Without that -immutable option, display replaces a transparent  
 background
 with a checkerboard background which apparently is something of an  
 industry
 standard to signal you really do have a transparent background.)
 
 I agree that this *can be* a really cool-looking effect, but IMHO it  
 can also be a really annoying/confusing looking effect (depending on  
 what's underneath/behind).  I think it would be nice to provide the  
 user the ability to choose how transparent backgrounds are rendered  
 (i.e. either see-through to windows underneath/behind or use a  
 predefined opaque background, e.g. checkerboard).

The problem is that we currently do not allow any choices. The cairo 
driver is explicitly starting with a non-transparent white background. 
It is not as clear to me exactly what the Qt driver is doing when it 
starts a new page, though I don't believe that the driver itself sets 
the background to be white.

-Hazen


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread Alan W. Irwin
On 2010-03-15 15:49-0700 David MacMahon wrote:


 On Mar 15, 2010, at 14:32 , Alan W. Irwin wrote:

 Then display -immutable test_transparent.png
 
 really does show the desktop underneath the plot which indeed is a
 really cool-looking effect.

 Using a very recent ImageMagick (6.6.0), display gives me the checkerboard 
 background without the -immutable option and a black background with that 
 option when looking at an image with a transparent background.  This might be 
 an X server limitation or window manager limitation, but it shows that this 
 feature is not universally available.

Please be explicit about exactly what you did because our devices other than
the three different svg ones are producing bad transparent background
results that depend very much on details.

Is this a -bg ff_0.0 result from -dev pngcairo or -dev pngqt with black
transformed to transparent using convert -transparent black ...? Note, the
-convert black option will not work if you use ff_0.1 because the (bad)
mixed opaque colour background result produced by -dev pngcairo is no longer
black in this case.

My imagemagick version is 7:6.3.7.9.dfsg2-1~lenny3.  I think that translates
to 6.3.7 for the upstream version so it is much older than yours.  Therefore,
I assume this is not an ImageMagick issue.

My two different Linux X servers (one for very old equipment with embedded
SiS video that has a reverse-engineered 2D-only driver for that hardware)
both give transparent results for the display -immutable option in that
case, but do not give that result in any other case (including SVG where our
three SVG devices produce correct results). From my reading there are
transparency limitations to the X server on Mac OS X so perhaps that is what
you are running into in the (corrected) -dev pngcairo  case.


 (Without that -immutable option, display replaces a transparent background
 with a checkerboard background which apparently is something of an industry
 standard to signal you really do have a transparent background.)

 I agree that this *can be* a really cool-looking effect, but IMHO it can also 
 be a really annoying/confusing looking effect (depending on what's 
 underneath/behind).  I think it would be nice to provide the user the ability 
 to choose how transparent backgrounds are rendered (i.e. either see-through 
 to windows underneath/behind or use a predefined opaque background, e.g. 
 checkerboard).

This would not be a good idea for file devices.  There, you want the user
running the file viewing application (say with something like the display
-immutable option) to control how transparent backgrounds are rendered.

In the separate case of interactive devices we should probably just follow
what is done by the underlying external stack of libraries (such as the
pango/cairo stack of libraries for -dev xcairo and the Qt4 stack of
libraries for -dev qtwidget). Of course, if that external stack of libraries
does offer the option of rendering transparent backgrounds as checkerboard
(which I believe from my reading is a de facto standard started by Adobe
photoshop) or as actually transparent for interactive devices, then it makes
sense to give PLplot users interactive control over that choice via a driver
option.

Anyhow, our current list of devices that treat transparent background
properly is limited to just svg, svgcairo, and svgqt as far as I can tell. I
hope we can soon expand that list both to the xcairo and qtwidget
interactive devices as well as many other file devices.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread Alan W. Irwin
On 2010-03-15 20:38-0400 Hazen Babcock wrote:

 The problem is that we currently do not allow any choices. The cairo driver 
 is explicitly starting with a non-transparent white background. It is not as 
 clear to me exactly what the Qt driver is doing when it starts a new page, 
 though I don't believe that the driver itself sets the background to be 
 white.

Hazen, wouldn't it be fairly straightforward to infer from the good svgcairo
results what to do for the other cairo file devices to get proper
transparent backgrounds for those devices?  My feeling is it would be easier
to deal with the cairo file devices first since their code is similar to the
svgcairo case and much simpler than in the xcairo case.

Similarly, I think that whoever tackles the qt case should attempt to expand
the good svgqt transparent background results to the other qt devices before
finally attempting to deal with the complicated qtwidget case.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread David MacMahon
Hi, Alan,

On Mar 15, 2010, at 17:49 , Alan W. Irwin wrote:

 On 2010-03-15 15:49-0700 David MacMahon wrote:

 Using a very recent ImageMagick (6.6.0), display gives me the  
 checkerboard background without the -immutable option and a  
 black background with that option when looking at an image with a  
 transparent background.  This might be an X server limitation or  
 window manager limitation, but it shows that this feature is not  
 universally available.

 Please be explicit about exactly what you did because our devices  
 other than
 the three different svg ones are producing bad transparent background
 results that depend very much on details.

Thanks for pressing me on this one.  It looks like I found a quirk  
with the display program.  I was using an image I had created with  
GIMP that I knew had a transparent background.  This image happens to  
be rather large (in pixels).  It seems that the window created by  
display -immutable foo.png will have a non-opaque background if  
foo.png is non-opaque and the window's size fits in the root X window  
(i.e. needs no panner).  Because my test file was large in pixels, it  
showed up in the display window with a black background and a little  
panner window for navigating around.  When I followed the steps you  
gave to create test_transparent.png, then display -immutable did  
indeed show it using a transparent window background (neat, except  
that I see my very cluttered desktop underneath! :-)).  If I run  
display -immutable -resize 1440x900! test_transparent.png it still  
comes up with transparency (my root window is 1440x900 as shown by  
xwininfo -root).  If I change either (or both) resize dimension to  
exceed the root window size, then I'm back to the solid black  
background.

 Therefore, I assume this is not an ImageMagick issue.

See what happens when you assume! :-)

 I agree that this *can be* a really cool-looking effect, but IMHO  
 it can also be a really annoying/confusing looking effect  
 (depending on what's underneath/behind).  I think it would be nice  
 to provide the user the ability to choose how transparent  
 backgrounds are rendered (i.e. either see-through to windows  
 underneath/behind or use a predefined opaque background, e.g.  
 checkerboard).

 This would not be a good idea for file devices.  There, you want  
 the user
 running the file viewing application (say with something like the  
 display
 -immutable option) to control how transparent backgrounds are  
 rendered.

Yes, obviously(?) for file devices we want real transparency.

 In the separate case of interactive devices we should probably just  
 follow
 what is done by the underlying external stack of libraries (such as  
 the
 pango/cairo stack of libraries for -dev xcairo and the Qt4 stack of
 libraries for -dev qtwidget).

I'm no expert on the PLplot devices, but my understanding is that the  
xcairo device is a cairo widget or surface drawn in a regular X  
window that has its own background.  If that's the case, then perhaps  
we would need to create the window with either a transparent or  
checkerboard background before drawing in it with cairo?

 Of course, if that external stack of libraries
 does offer the option of rendering transparent backgrounds as  
 checkerboard
 (which I believe from my reading is a de facto standard started by  
 Adobe
 photoshop) or as actually transparent for interactive devices, then  
 it makes
 sense to give PLplot users interactive control over that choice via  
 a driver
 option.

IMHO, the choice of transparent or non-transparent window backgrounds  
transcends the particular interactive device chosen.  PLplot already  
has generic -nopixmap and -db options for X-based drivers.  A  
similar PLplot option (i.e not a driver option) to choose between  
opaque and non-opaque *window* backgrounds seems appropriate (again,  
IMHO).  Given that transparent window backgrounds are more resource  
intensive (does it even work without an accelerated graphics  
driver?), I think the default should be an opaque (of some sort)  
window background even when the plot background is non-opaque.

 Anyhow, our current list of devices that treat transparent background
 properly is limited to just svg, svgcairo, and svgqt as far as I  
 can tell. I
 hope we can soon expand that list both to the xcairo and qtwidget
 interactive devices as well as many other file devices.

I certainly agree that it would be good to expand the list of devices  
that treat transparent background properly.  For file outputs, there  
seems to be little ambiguity, but defining proper treatment for  
interactive devices seems not so clear (pun partially intended! :-)).

Dave


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel 

Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-15 Thread Alan W. Irwin
On 2010-03-15 21:44-0700 David MacMahon wrote:

 I'm no expert on the PLplot devices, but my understanding is that the xcairo 
 device is a cairo widget or surface drawn in a regular X window that 
 has its own background.  If that's the case, then perhaps we would need to 
 create the window with either a transparent or checkerboard background before 
 drawing in it with cairo?

Let's go for the low-hanging fruit first and wait and see on the rest. Thus,
I feel the priorities should be implementing correct transparent background
for cairo file devices, then see what is possible with xcairo in this
regard, then at that point if necessary (after all, transparent backgrounds
might not be possible at all with xcairo) decide on the issue you are
concerned about.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-14 Thread Hezekiah M. Carty
On Sat, Mar 13, 2010 at 5:12 PM, Alan W. Irwin
ir...@beluga.phys.uvic.ca wrote:
 On 2010-03-13 13:16-0800 Alan W. Irwin wrote:

 On 2010-03-13 14:45-0500 Hazen Babcock wrote:

 Alan W. Irwin wrote:

 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears
 this
 issue may be specific within the cairo devices to just -dev xcairo
 although
 I haven't checked the other cairo device possibilities beside pscairo.

 Looks like it was an issue with the driver not using the good PLplot
 core
 fallback clear capability.

 Hmm. after updating to get your fix and make cairo I still get the same
 (bad) result (with page 1 still visible underneath) for

 examples/c/x02c -dev xcairo  -bg FF_0.1

 examples/c/x02c -dev qtwidget -bg FF_01

 was fine.

 I haven't tried a completely clean build yet, but make cairo did create
 a new cairo device driver so your fix should be properly built. [...]

 Yep, same (bad) results for an absolutely clean build tree, and I
 double-checked the cairo.c code had your fix.  In fact, no change in the
 results is expected as a result of your change since the default value of
 pls-dev_clear is zero in any case.

 Just in case, I also tried a direct (rather than X-terminal) display and
 continued to get the same bad xcairo and good qtwidget transparent
 background results.

 Do you currently get good results for the above test with -dev xcairo?

 Currently, there are problems with Hez's recent cairo change (see my next
 post) so that the cairo file devices all segfault.  However, if I revert
 back to --revision 10861 for cairo.c, then the segfaults disappear and then
 pngcairo does not have this transparent background issue while xcairo still
 does.  The conclusion from this test is the transparent background issue is
 likely due to some difference in treatment between the cairo file devices
 and xcairo, and whatever the xcairo issue, it is independent of Hez's recent
 changes.


I get similar results on a fresh trunk source tree.  What should the
default background color be?  The qtwidget device seems to assume
white as the default background, regardless of the base color palette:

Both:

./x11c -cmap0 cmap0_default.pal -bg ff_0.3 -dev qtwidget

and

./x11c -cmap0 cmap0_alternate.pal -bg ff_0.3 -dev qtwidget

produce output with the same light-blue background color.  This is
probably the best approach from the standpoint of least surprise
from the user.

I have the few lines of changes ready to address this once the
background color to overlay the transparent color over is decided on.

Hez

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-14 Thread Hezekiah M. Carty
On Sun, Mar 14, 2010 at 9:54 AM, Hezekiah M. Carty
hezekiahca...@users.sourceforge.net wrote:
 On Sat, Mar 13, 2010 at 5:12 PM, Alan W. Irwin
 ir...@beluga.phys.uvic.ca wrote:
 On 2010-03-13 13:16-0800 Alan W. Irwin wrote:

 On 2010-03-13 14:45-0500 Hazen Babcock wrote:

 Alan W. Irwin wrote:

 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears
 this
 issue may be specific within the cairo devices to just -dev xcairo
 although
 I haven't checked the other cairo device possibilities beside pscairo.

 Looks like it was an issue with the driver not using the good PLplot
 core
 fallback clear capability.

 Hmm. after updating to get your fix and make cairo I still get the same
 (bad) result (with page 1 still visible underneath) for

 examples/c/x02c -dev xcairo  -bg FF_0.1

 examples/c/x02c -dev qtwidget -bg FF_01

 was fine.


 I get similar results on a fresh trunk source tree.  What should the
 default background color be?  The qtwidget device seems to assume
 white as the default background, regardless of the base color palette:


Revision 10866 should fix this.  If the background color has an alpha
value  1.0 then a white surface is drawn before the transparent
background color.  This produces good looking results for all of the
Cairo devices on my system (Ubuntu 9.10, Cairo 1.8.8).

Hez

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-14 Thread Alan W. Irwin
On 2010-03-14 10:50-0500 Hezekiah M. Carty wrote:

 Hmm. after updating to get your fix and make cairo I still get the same
 (bad) result (with page 1 still visible underneath) for

 examples/c/x02c -dev xcairo  -bg FF_0.1

 examples/c/x02c -dev qtwidget -bg FF_01

 was fine.


 I get similar results on a fresh trunk source tree.  What should the
 default background color be?  The qtwidget device seems to assume
 white as the default background, regardless of the base color palette:


 Revision 10866 should fix this.  If the background color has an alpha
 value  1.0 then a white surface is drawn before the transparent
 background color.  This produces good looking results for all of the
 Cairo devices on my system (Ubuntu 9.10, Cairo 1.8.8).

This fix obscures the underlying layers as advertised so stops the leaking
through of the first page onto the second.  However, I don't like this way
of dealing with the issue (which from your comments, qtwidget uses as well).

We want transparent backgrounds to be transparent because we would like to
implement the absolutely cool effect of seeing the plot superimposed on the
desktop underneath the GUI.

To work toward that goal, we must avoid putting in any obscuring layers.
Actually, the previous cairo version did not put in an obscuring layer which
was good, but the problem was the plot from the previous page was not
removed.  Shouldn't you be able to deal with this issue by closing the old
page and initiating a completely new one each time there is a new page in
the example?  I think that is what the cairo file devices do. Furthermore,
is there a cairo page setup feature you could use that initiated the GUI
with no cairo (as opposed to PLplot) background? If so, then the PLplot
background would be the absolutely first layer of the GUI so that if it were
transparent, you would see through to the underlying desktop.

In sum, that is potentially a very cool effect which I hope we will be able
to implement by initiating pango/cairo correctly and by not putting in any
obscuring layers.  Same comment for qt.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-14 Thread Hazen Babcock
Alan W. Irwin wrote:
 On 2010-03-13 13:16-0800 Alan W. Irwin wrote:
 
 On 2010-03-13 14:45-0500 Hazen Babcock wrote:

 Alan W. Irwin wrote:
 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears this
 issue may be specific within the cairo devices to just -dev xcairo although
 I haven't checked the other cairo device possibilities beside pscairo.
 Looks like it was an issue with the driver not using the good PLplot core
 fallback clear capability.
 Hmm. after updating to get your fix and make cairo I still get the same
 (bad) result (with page 1 still visible underneath) for

 examples/c/x02c -dev xcairo  -bg FF_0.1

 examples/c/x02c -dev qtwidget -bg FF_01

 was fine.

 I haven't tried a completely clean build yet, but make cairo did create
 a new cairo device driver so your fix should be properly built. [...]
 
 Yep, same (bad) results for an absolutely clean build tree, and I
 double-checked the cairo.c code had your fix.  In fact, no change in the
 results is expected as a result of your change since the default value of
 pls-dev_clear is zero in any case.
 
 Just in case, I also tried a direct (rather than X-terminal) display and
 continued to get the same bad xcairo and good qtwidget transparent
 background results.
 
 Do you currently get good results for the above test with -dev xcairo?

Well I thought I did, otherwise I would not have checked in the change 
claiming that it fixed the problem... However I am mistaken as I am now 
getting the same bad result as you.

-Hazen


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-13 Thread Hazen Babcock
Alan W. Irwin wrote:
 On 2010-03-10 00:43-0800 David MacMahon wrote:
 
 I just ran this...

 x02c -dev xcairo -bg ff_0.3

 ...and noticed on the second plot I can see through to the first
 plot.  I don't think I have any other non-cairo, alpha-capable
 drivers built so I can't tell if it's cairo-related or more general.
 
  12 svgScalable Vector Graphics (SVG 1.1)

 Can someone with qt devices please try this?
 
 Good spotting.  It's a rendering bug that appears to be specific
 to -dev xcairo.
 
 -dev qtwidget does not have this problem, and neither does -dev svg. (For
 the latter, you must use the familying option -fam which will generate two
 files corresponding to the two pages.)
 
 An even more spectacular example of this xcairo bug is example 8.  The first
 four pages look okay (since they duplicate each other in most respects), but
 then for pages 5 through 8, the page 4 plot gently fades away in the
 background as more and more partially transparent layers are added on top of
 it.
 
 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears this
 issue may be specific within the cairo devices to just -dev xcairo although
 I haven't checked the other cairo device possibilities beside pscairo.

Looks like it was an issue with the driver not using the good PLplot 
core fallback clear capability.

-Hazen


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-13 Thread Alan W. Irwin
On 2010-03-13 14:45-0500 Hazen Babcock wrote:

 Alan W. Irwin wrote:
 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears this
 issue may be specific within the cairo devices to just -dev xcairo although
 I haven't checked the other cairo device possibilities beside pscairo.

 Looks like it was an issue with the driver not using the good PLplot core 
 fallback clear capability.

Hmm. after updating to get your fix and make cairo I still get the same
(bad) result (with page 1 still visible underneath) for

examples/c/x02c -dev xcairo  -bg FF_0.1

examples/c/x02c -dev qtwidget -bg FF_01

was fine.

I haven't tried a completely clean build yet, but make cairo did create
a new cairo device driver so your fix should be properly built.  Do you
currently get good results for the above test with -dev xcairo?

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-13 Thread Alan W. Irwin
On 2010-03-13 13:16-0800 Alan W. Irwin wrote:

 On 2010-03-13 14:45-0500 Hazen Babcock wrote:

 Alan W. Irwin wrote:
 Hazen, will you have a look at this issue, please?  This transparent
 background issue does not appear for, e.g., -dev pscairo so it appears this
 issue may be specific within the cairo devices to just -dev xcairo although
 I haven't checked the other cairo device possibilities beside pscairo.

 Looks like it was an issue with the driver not using the good PLplot core
 fallback clear capability.

 Hmm. after updating to get your fix and make cairo I still get the same
 (bad) result (with page 1 still visible underneath) for

 examples/c/x02c -dev xcairo  -bg FF_0.1

 examples/c/x02c -dev qtwidget -bg FF_01

 was fine.

 I haven't tried a completely clean build yet, but make cairo did create
 a new cairo device driver so your fix should be properly built. [...]

Yep, same (bad) results for an absolutely clean build tree, and I
double-checked the cairo.c code had your fix.  In fact, no change in the
results is expected as a result of your change since the default value of
pls-dev_clear is zero in any case.

Just in case, I also tried a direct (rather than X-terminal) display and
continued to get the same bad xcairo and good qtwidget transparent
background results.

Do you currently get good results for the above test with -dev xcairo?

Currently, there are problems with Hez's recent cairo change (see my next
post) so that the cairo file devices all segfault.  However, if I revert
back to --revision 10861 for cairo.c, then the segfaults disappear and then
pngcairo does not have this transparent background issue while xcairo still
does.  The conclusion from this test is the transparent background issue is 
likely due to some difference in treatment between the cairo file devices
and xcairo, and whatever the xcairo issue, it is independent of Hez's recent
changes.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-10 Thread David MacMahon
Thanks for confirming this, Alan!

On Mar 10, 2010, at 8:09 , Alan W. Irwin wrote:

 -dev qtwidget does not have this problem, and neither does -dev  
 svg. (For
 the latter, you must use the familying option -fam which will  
 generate two
 files corresponding to the two pages.)

I don't know how qtwidget does it's plots, so I can't comment on  
that, but for svg, I think the fact that the second plot comes out OK  
is not so conclusive.  The pdfcairo driver also produces a two page  
output file.  Page 2 of that file looks OK, too, but it is a separate  
page after all.

I'm not really sure how to interpret alpha for the background of a  
GUI window.  What's behind the background to see through too?  For  
graphics files (e.g. .png or .svg) they might be overlaid on  
something else so background transparency there is more intuitive.

Perhaps if the background is non-opaque, GUIs could draw an opaque  
checkerboard backbackground (like the gimp does) before drawing the  
non-opaque background?

Or maybe the GUI widgets being rendered into have their own alpha  
channel and could therefore be layered in a way that would give the  
background's alpha channel an obvious meaning?  In this case, the GUI  
widget would need to be cleared before drawing the non-opaque  
background of a subsequent plot.

Dave


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-10 Thread Alan W. Irwin
On 2010-03-10 10:15-0800 David MacMahon wrote:

 I'm not really sure how to interpret alpha for the background of a GUI 
 window.  What's behind the background to see through too?  For graphics files 
 (e.g. .png or .svg) they might be overlaid on something else so background 
 transparency there is more intuitive.

 Perhaps if the background is non-opaque, GUIs could draw an opaque 
 checkerboard backbackground (like the gimp does) before drawing the 
 non-opaque background?

 Or maybe the GUI widgets being rendered into have their own alpha channel and 
 could therefore be layered in a way that would give the background's alpha 
 channel an obvious meaning?  In this case, the GUI widget would need to be 
 cleared before drawing the non-opaque background of a subsequent plot.

I think the best way to state this is that PLplot implements transparent
backgrounds for its modern devices, but other applications have to do their
part as well to allow overall background transparency.  There are already
some neat transparent background effects being deployed on the desktop
(e.g., if you move a KDE GUI it becomes transparent so you can see
underneath it) that show this is possible.  Thus, for example, I assume some
file viewers may already allow transparent background options of their own
so that when that is combined with a transparent PLplot background you could
see through to the application below.  Similarly, I assume there are GUI
options for GNOME and KDE to allow transparent GUI backgrounds.  But I have
not researched any of this yet.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] -bg with alpha gives strange overlay effect on x02c

2010-03-10 Thread David MacMahon

On Mar 10, 2010, at 11:05 , Alan W. Irwin wrote:

 There are already
 some neat transparent background effects being deployed on the desktop
 (e.g., if you move a KDE GUI it becomes transparent so you can see
 underneath it) that show this is possible.

I think this might be a property of the window manager rather than  
the window itself or the application displaying in the window.

 Thus, for example, I assume some
 file viewers may already allow transparent background options of  
 their own
 so that when that is combined with a transparent PLplot background  
 you could
 see through to the application below.  Similarly, I assume there  
 are GUI
 options for GNOME and KDE to allow transparent GUI backgrounds.

If there is a window manager independent way of making a window's  
background transparent then it would be great to use.  Not sure how  
this would work on MS Windows vs X Windows.

 But I have
 not researched any of this yet.

Me neither! :-)

Dave


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel