
18 Mar
2005
18 Mar
'05
7:40 p.m.
Also, I am trying to make it so the units in the ellipse properties dialog (from a right click) is displayed in the default units of the document. I see a function to get the default units of a document, but I am unclear on how to get the current document. Any ideas?
As a matter of general principle, the question you want to ask is not "what is the current document", but "what document does this object belong to"?
SP_OBJECT_DOCUMENT(object) (from memory... it's something like that anyway) should answer that question for you.
The reason is that (especially as we introduce scripting of Inkscape itself) the document a particular command operates upon will not necessarily be the current document.
-mental