
bulia byak wrote, On 12/20/08 20:27:
On Sat, Dec 20, 2008 at 3:19 PM, Jasper van de Gronde
My guess is that there simply isn't any instance of SPDesktop when Inkscape is used as a command line executable. So possibly the error isn't in sp_item_i2d_affine as such, but rather in the fact that it is being called at all. If anyone with a bit more understanding of this area of the code could have a look that would be great.
You are right. In command line mode, there are no desktops, only documents. So, desktops should only be used in UI code, never in low-level rendering code.
I didn't know that you can't count on the presence of an active desktop.
Hmm... but still the command line export uses "desktop" coordinates (with --export-area=x0:y0:x1:y1) and the function sp_export_png_file expects an area in desktop coordinates as well. The transformation is trivial and is done there by coordinate flipping and shifting by document height.
I'll revert the change from revision 20388 for now which caused the crash.
Thomas