Hi Alan
There is plenty of cool stuff there, but remembering that plplot is a library 
and not an application our job should be to enable transparency and allow the 
user to do that cool stuff - but that might form the basis of a demo.

Here is my opinion:
For file output, it should just be like a transparent/semitransparent rectangle 
was drawn over the page as the first render object.
For drivers where the user provides the canvas, things should be just as for 
file output. This would allow users to draw over existing items - I'm thinking, 
e.g. A report program that includes text and provides this dc to plplot to draw 
plots on too.
For interactive drivers where the user does not provide the canvas I am not 
sure what to do. In this case I think the most appropriate thing is to ignore 
transparency. I don't think making the window transparent is appropriate as it 
will just generate lots of driver and platform dependant inconsistencies.

Regarding page clears. I feel that a new page is a new page and should not show 
previous pages in the background. Presumably this is dealt with by new files or 
document pages in many cases. If users want to simulate this effect they can do 
so themselves using plclear calls with semitransparent background colours.

I think all this will then be consistent with transparent lines and shapes 
rendered by other calls.

Phil


-----Original Message-----
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
Sent: ‎06/‎02/‎2016 22:00
To: "Phil Rosenberg" <p.d.rosenb...@gmail.com>
Cc: "Greg Jung" <gvj...@gmail.com>; "Jim Dishaw" <j...@dishaw.org>; 
"plplot-devel@lists.sourceforge.net" <plplot-devel@lists.sourceforge.net>
Subject: Uniformly coloured semitransparent backgrounds

Hi Phil:

Part of the overall goal of getting RGBA background images to work is
to get the "A" (alpha channel) component of that to work properly, and
so a preliminary goal should be to implement uniformly colored
semitransparent backgrounds correctly.


Some current semitransparent background issues we should be aware of:

* Device driver issues:

Just for a single page plot where I specify a completely transparent
background, there are issues for a number of our devices.  Ones that
apparently do work currently are the qt devices.  For example,

examples/c/x00c -dev pdfqt -bg 000000_0.0 -o test.pdf

does produce a transparent background for that pdf as proved by the
ImageMagick "display" command rendering that transparent background as
a checkerboard.  But the same experiment with pdfcairo shows an opaque
white background. I believe that should be considered to be a bug in
the cairo devices since the fundamental principle should be if a user
specifies a semitransparent background (as above), that is exactly
what PLplot drivers should supply rather than substituting something
else in the belief that we know better than the user!

* Interactive device issues:

Even though the above experiment with pdfqt demonstrates that device
follows the user wishes, it is not clear that also occurs for the
qtwidget device because I could not get the desired result
(a completely transparent background) to work for qtwidget.  Of
course, that may have nothing to do with our qt device
and may be related to the following compositing issue.

* Desktop compositing issues:

There is an ImageMagick "display" option to actually honor the
transparent background request rather than replacing it with a
checkboard.  I cannot remember that exact option, but when I tried it
years ago, the result was the plot is displayed on top of whatever
your desktop would be displaying otherwise (what I call the root
desktop below). But it would be cooler still if it worked for
semitransparent backgrounds (as opposed to completely transparent like
in the above case), but when I last tried this there were KDE/X
compositing issues that didn't allow that to work properly.  I have no
idea whether my KDE/X desktop software has been fixed yet in this
regard or not.

* Multiple page issues:

I can forsee the need for two modes here for those interactive cases
where pages are normally just stacked on top of the previous pages
with a background superimposed at the start and between each page. If
that background is completely transparent, then you should see the
whole stack of previous results right back to the root desktop
(whatever the desktop software would be displaying if the plot GUI was
not superimposed on top), and if the transparency is dropped to say 90
per cent then you will see that stack of previous results gradually
fading away as you display contents from deeper in the stack to make a
really cool-looking effect.  So this possibility of seeing everything
in the stack modified by the transparency of the superimposed
backgrounds in between should be allowed, but there should also be an
interactive mode that starts fresh with each page, i.e., the root
desktop is displayed, then the semitransparent background, then the
plot for the single page.

In sum, this whole field of supporting RGBA background images for each
plot page is an extremely interesting one, but to get the "A" part of
that to work correctly we need to deal with the above issues that show
up even when the background "RGBA image" is a simple one that is
uniformly coloured.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________


__________________________
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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to