18 Mar
2011
18 Mar
'11
10:41 p.m.
I do not know of any way of reading the mouse position from inside a Python extension, or trapping an event like a mouse click; however... it might be worthwhile to consider the following workaround. - ask the user to draw a small rectangle (or anything) at the desired position - make sure this is still selected when you load the extension - from inside the Python extension, detect the selected object, and overwrite it with your custom object, removing the original rectangle completely
You may be able to re-use some of the ideas present in the "Modify Path" submenu, for example, perspective.py, which modifies an existing object.
hth, Alvin Penner
--
View this message in context: http://old.nabble.com/Writing-an-extension-for-a-new-object-type-tp31174250p...
Sent from the Inkscape - User mailing list archive at Nabble.com.