A Couple of questions on OGL Lineshapes

crjjrc crjjrc at gmail.com
Fri Jul 13 06:09:00 PDT 2007


On Jul 13, 5:19 am, jcam... at lcc.uma.es (Javier Cámara Moreno) wrote:

> 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 think you're probably better of asking these questions in an OpenGL
forum, like comp.graphics.api.opengl.

For bitmap or textured fonts, you're going to need to implement some
blending and masking operations to get what you want, unless your
images have alpha defined appropriately and you can use the alpha
test.  Check out nehe.gamedev.net, lesson 20, for how to use masking
and blending.  Or you can use vector fonts which are drawn using
geometric primitives to construct each letter.

> 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?

You provide the control points to build the spline.  Why not just
provide the new control points to rebuild the spline?

- Chris







More information about the wx-users mailing list