hello,

I have started a quick draft for a project and uses FloatCanvas, which  
and it is a perfect fit! Thank you to the people involved.

I would like to copy (duplicate) DrawObjects, I tried the following  
way but the copied objects are not drawn in the canvas :

...
from copy import copy

rect = FloatCanvas.Rectangle((0,0),(100,100), LineColor='RED')
rect2 = copy(rect)
rect2.Move((20,30))     
Canvas.AddObjects([rect,rect2])

Canvas.Draw(Force=True)

print Canvas._DrawList
print Canvas._ForeDrawList

this prints the following :

[<floatcanvas.FloatCanvas.Rectangle instance at 0xa3f468>,  
<floatcanvas.FloatCanvas.Rectangle instance at 0xa3f5f8>]
[]

but only the first ('rect') rectangle is visible. Could you indicate  
me a way to build a "copy" method for the DrawObject-s?

Thank you, have a nice week,
Pierre
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to