François Pinard <[EMAIL PROTECTED]> writes:

> Matt Wilson <[EMAIL PROTECTED]> écrit:
> 
> > The easiest way to do this by far is to use the canvas.  [...]  The canvas
> > does all this for you.
> 
> Thanks for the example, Matt, but this is not pure `pygtk' (or GDK) anymore,
> if it needs `gnome.ui' and GnomeCanvas.

I don't think there's a way to do what you want in pure pygtk.

[...]
> So, I would like to know if/how I can, using GTK and GDK, and the `pygtk'
> interface to both, create and handle an alpha channel, and feel able do
> anti-alias myself if I want to (that is, if GTK has no provision for it).

Well, since doing it yourself probably requires a C-module, you might as
well sue libart for anti-aliased rendering. libart is the rendering
library for the anti-aliased gnome canvas and quite independent from
gnome.

FWIW, the development versions of Sketch contain some python-bindings
for libart that can render into libart rgb buffers and even into PIL
images (including alpha channels, but I haven't really tested that).
These bindings are somewhat sketch specific, though, so it might not be
all that easy to adapt them to a different application.

-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
[EMAIL PROTECTED]  | http://sketch.sourceforge.net/
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to