Does OGL feature transparency?

Hi wxPythoneers

For a visualisation application I need to have a 2D Canvas that features transparency with alpha belnding. Simply leaving an area undrawn is not enough. Does OGL support this?

Anti-Aliasing would be brilliant, too.

First, I tried with Tkinter, but got stuck very soon...

What I am looking for is basically the functionality of Java2D in Python. Any suggestions?

http://java.sun.com/products/java-media/2D/index.jsp
http://java.sun.com/j2se/1.4.2/docs/guide/2d/spec/j2d-awt.html#wp64995

Thanks for your help
Andre

Well, OGL is built on wxDC, which does not support alpha blending or anti-aliasing (except perhaps text). It would be nice if it did. In the meantime, Antigrain graphics(AGG) is an option to look into:

http://www.antigrain.com/

It has been used for at least two Python projects: Chaco and Matplotlib (both integrating with wxPython). There was some discussion on this list a little while back about how nice it would be to make a wxAggDC. I'd still love to see that, but someone has to actually do it! Could that be you?

-Chris

···

a.meyer@hccnet.nl wrote:

For a visualisation application I need to have a 2D Canvas that features transparency with alpha belnding. Simply leaving an area undrawn is not enough. Does OGL support this?
Anti-Aliasing would be brilliant, too.

What I am looking for is basically the functionality of Java2D in Python. Any suggestions?

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Wow, Antigrain looks awesome!

Unfortunately, my priorities are a bit different than to allow me to
work on this. However I found the following post to the SciPy list:

Maybe the wxPython community can convince McSeem to take up the job…
Chris Barker wrote:

···

http://www.scipy.net/pipermail/scipy-dev/2004-June/002161.html

[SciPy-dev] Hello

Maxim Shemanarevmcseem at antigrain.com
Sun Jun 20 13:20:18 CDT 2004



Hello All,
I'm Maxim Shemanarev and I will work on the new graphic back-end in Kiva.
It's based on my Anti-Grain Geometry ([http://antigrain.com](http://antigrain.com)
). I can perfectly
do the C++ part of the job, and Eric and I have lots of new ideas, but I
also will need to do some job in Python and SWIG. I'm still not very good in
those things, so, please forgive me possible stupid questions. I will
gratefully appreciate your help. Currently I'm working on improving
alpha-blending in AGG (very basic things), so it will be a while before I
ask you of some help.
Thank you in advance.
McSeem

wrote:
Well, OGL is built on wxDC, which does not support alpha blending or
anti-aliasing (except perhaps text). It would be nice if it did. In the
meantime, Antigrain graphics(AGG) is an option to look into:
It has been used for at least two Python projects: Chaco and Matplotlib
(both integrating with wxPython). There was some discussion on this
list a little while back about how nice it would be to make a wxAggDC.
I’d still love to see that, but someone has to actually do it! Could
that be you?
-Chris
a.meyer@hccnet.nl

For a visualisation application I need to

have a 2D Canvas that features transparency with alpha belnding. Simply
leaving an area undrawn is not enough. Does OGL support this?

Anti-Aliasing would be brilliant, too.

What I am looking for is basically the

functionality of Java2D in Python. Any suggestions?

http://www.antigrain.com/

BTW Just found this: http://matplotlib.sourceforge.net/

You may want to look at wxAgg: http://matplotlib.sourceforge.net/backends.html#WXAgg

This comes very close to the ideal package for my purposes! However, it is intended for plotting rather than interactive graphics.

g
Andre

Andre Meyer wrote:

BTW Just found this: http://matplotlib.sourceforge.net/

You may want to look at wxAgg: http://matplotlib.sourceforge.net/backends.html#WXAgg

This comes very close to the ideal package for my purposes! However, it is intended for plotting rather than interactive graphics.

right. both matplotlib and Chaco are plotting packages that can optionally use use Agg for rendering. However, in both cases, they have wrapped just that functionality that was required for their purposes. It would be nice to have a general purpose wrapper for Python, Ideally one that could be used with wx, PIL, and ???

The SciPy mailing list site seems to be down at the moment, so I couldn't look at that message, but it looks like there is someone involved in Agg development that's interested in Python. Good news!

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov