On Tue, Feb 24, 2009 at 3:51 AM, mundochis <[email protected]> wrote:
>
> Hi, so I'm just getting started with cocos, and I had a question about
> the Line class in cocos.draw.
>
> Basically I tried creating a line as such:
>
> from cocos.draw import Line
> ....
>
> my_layer.add(Line((0, 0), (100, 100), (255, 255, 255, 255)))
>
> However, I get an exception on draw.py, line 344, in move_to
> TypeError: _EuclidMetaclass object argument after * must be a sequence
>
using revision #806 from trunk, i did:
class TestLayer(cocos.layer.Layer):
def __init__(self):
super( TestLayer, self ).__init__()
line = draw.Line((0,0), (100,100), (255,255,255,255))
self.add( line )
if __name__ == "__main__":
director.init()
test_layer = TestLayer ()
main_scene = cocos.scene.Scene (test_layer)
director.run (main_scene)
and it worked. i also added tests/test_draw_line.py with the full code
for the test.
Can you check that you have that revision (although i dont think weve
fixed anything in that code lately) and compare your code to this
example and let me know what you find out?
Thanks,
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
-~----------~----~----~----~------~----~------~--~---