
On Fri, 18 Mar 2005 14:11:34 -0500 (EST), Michael Forbes <miforbes@...734...> wrote:
I like the gsave/grestore option, as initclip may mess with clipping from earlier in the file, perhaps. Something like this:
Tested & applied, thanks
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?
Actually we're planning to remove those "properties" dialogs. They have too many problems and just add cruft. All controls on shapes must be in the corresponding tool's control panels (e.g. switch to the ellipse tool, select an ellipse and edit its parameters in the panel above the canvas). These panels don't yet have all the parameters that would be nice to have, so instead you could work on adding the missing ones (e.g. the center and radii of an ellipse). Look up in the Rectangle panel how to add units there. It's all in toolbox.cpp.
As for your question, to look up current document _from a dialog_ use SP_DT_DOCUMENT(SP_ACTIVE_DESKTOP). From a fixed per-window panel, use that panel's desktop (passed to it upon initialization) instead of SP_ACTIVE_DESKTOP.