I have just (revision 10188) enabled alpha channel/transparency for our background colour for the cairo and svg device drivers. These drivers thus join the gd device driver in handling this correctly, and I hope later this week, Alban will be able to enable the same functionality for the qt devices (along with his planned changes to enable rgb background colour for the qt devices.)
For now you can see what semi-transparent backgrounds look like by locally changing the second line of cmap0_black_on_white.pal from #ffffff 1.0 to, e.g., #ff0000 0.3 which gives a red mostly transparent background for the gd, cairo, and svg devices (and an opaque red background for our devices which are not transparency aware). I would also like to specify the transparency of the background conveniently using the -bg command-line option. I was thinking along the lines of -bg ff0000_0.3 to specify the same semitransparent background that I gave as an example above. The implementation would simply check the length of the option string and if greater than 6, parse the first 6 as hex, check for the underscore, and parse the remainder as a floating point value. Please comment _soon_ if you forsee any trouble with that implementation idea. Of course, our current semitransparent background results look rather dull because linux applications still are not as transparency aware as they should be, and therefore, they currently tend to impose opaque backgrounds of their own upon which the PLplot background is superimposed. To sort out which background is which, you can sometimes specify a background colour for the application. For example, the ImageMagick "display" application has the -background option to specify an opaque colour for their background, and I was able to use that "display" option to prove that _our_ background transparency was working correctly for the gd, cairo, and svg devices. (Of course, it would be nice if the "display" background could be semi-transparent as well so I hope some ImageMagick developer is working on that.) In the future, as Linux and other OS's become completely transparency aware, I can forsee our semi-transparent background capability allowing for some really cool effects such as superimposing our plots on top of other images or just on top of the general desktop behind where one of our plots is displayed. Anyhow, that was the motivation for the latest commit and will also be the motivation for the planned change to the -bg command-line option. 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 __________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
