On Thu, Mar 26, 2009 at 1:45 AM, Rudy <[email protected]> wrote: > > Hi > How do simple hapes inside of a Layer object ? > > > * pyglet.gl.GL_LINES * pyglet.gl.GL_LINE_LOOP > * pyglet.gl.GL_LINE_STRIP * pyglet.gl.GL_TRIANGLE_STRIP > * pyglet.gl.GL_TRIANGLE_FAN * pyglet.gl.GL_QUADS > * pyglet.gl.GL_QUAD_STRIP * pyglet.gl.GL_POLYGON > > > > Ultimately I want to draw shapes (lines , polygons & pies/arcs) using > approxiimate coordinates from mouse path
from http://cocos2d.org/doc/api/ : draw draw(self, *args, **kwargs) This is the function you will have to override if you want your subclassed to draw something on screen. You must respect the position, scale, rotation and anchor attributes. If you want OpenGL to do the scaling for you, you can: def draw(self): glPushMatrix() self.transform() # ... draw .. glPopMatrix() Every cocosnode has gets that method called. And a layer is a cocosnode. Lucio. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
