Question about alpha blending and low level drawing on widgets
Gabriele Farina *DarkBard*
darkbard at extending-php.net
Mon Jun 28 16:39:20 EDT 2004
Hi, sorry for the strange title, but I have to ask you if you can help me:
I'm planning to start a project where I need a Macromedia-Flash-like
drawing canvas. I started implementing my own using wxPython but I
sopped myself when I undestood that there was no way to draw primitives
filling them with opaque colors.
So I tried to include a Pygame inside wxPython (I need a multi platform
GUI engine), but there where 2 problems:
1) the pygame window flips a lot on resize;
2) when I try to run my simple example on Linux (Suze 9.1) it crashes,
giveing me this error:
(test.py:2772): Gdk-WARNING **: gdkdrawable-x11.c:1012 drawable is not a
pixmap or window
The program 'test.py' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 42 error_code 3 request_code 3 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error()
function.)
....
I think there are some problems with the window handle I use to set the
window where SDL must draw, but I can't understand where ...
So I thought other ways:
1) using PyOpengl (tha supports alpha whe drawing primitives, supports
very well zooming and gradient filling), but I think it is not a good
choice because of some problems related to videocards ...
2) Use TK Canvas, but I think it does not understand alpha (am I right??) ..
3) Use QT, but I need a multiplatform application, and under windows QT
are not totally free ...
So my question is:
how can i solve my problem ?? :)
There is a GUI toolkit (maybe FOX??) that gives me a way to make low
level drawing using alpha??
There is a way to implement alpha drawing in wxPython??
tnx a lot, sorry for my cursed english ;)
bye,
Gabriele
More information about the Python-list
mailing list