A Couple of questions on OGL Lineshapes
Stephan Rose
kermos at somrek.net
Fri Jul 13 15:47:19 PDT 2007
On Fri, 2007-07-13 at 12:19 +0200, Javier Cámara Moreno wrote:
> Hi everybody,
>
> I am developing a little graph editor using python 2.5 and wx 2.8.
> Whenever I try to add text to a line shape I get a big rectangle on the
> background which covers the shapes. Is there a way to render the text on
> a transparent background? I googled and found the same question in
> several places, but no answers :)
Yes you can. There are multiple ways to do it.
1. Define an alpha color key and enable it in OpenGL. This will remove
all pixels that match the alpha color key.
Looks like crap though.
2. Enable alpha blending and make sure your font textures contain alpha
information (use an RGBA format instead of just RGB).
This method can give you the best possible visual results. Plenty
tutorials on alpha blending out there and how to set it up.
>
> The second thing is: If I am drawing a lineshape as an spline, control
> points are fixed. Is there a way to update the position of this control
> points when I move the shapes which are connected to the line?
I don't entirely understand this question. It's your software. Your
control points. You gotta be storing them in memory somewhere, so what's
keeping you from updating them? Of course you can update them. They are
your points =)
Stephan
More information about the wx-users
mailing list