On 29/8/11 01:12, Krzysztof KosiĆski wrote:
Revision 10589 removes all trace of libnr from Inkscape's code, which was a major refactoring goal. This is a rather big change and might break various things. Here is a short summary of the changes:
(...)
- SPItem bounding box methods were rewritten. There are now methods
for bounding boxes in 3 different coordinate systems:
- visualBounds(), geometricBounds(), bounds() - bounds in the item's
own coord system
- desktopVisualBounds(), desktopGeometricBounds(), desktopBounds() -
bounds in desktop coordinate system (origin in bottom left, but user-editable in the future)
- documentVisualBounds(), documentGeometricBounds(), documentBounds()
- bounds in SVG coordinate system
The "geometric" version returns the object bounding box as defined by SVG (does not consider stroke, filters, clipping paths, masks, etc.). The "visual" version considers all of this to return the bounds of the area affected by the object. The legacy "approximate bbox" was removed.
1) The bounding box (visual and geometric) of groups containing clones or (nested) groups with preserved transforms is incorrect, causing among other things many icons from the shared icons file to misrender in the GUI:
Bug #836536 "Many icons are corrupted in trunk-r10589" https://bugs.launchpad.net/inkscape/+bug/836536
2) The new bounding box calculations seem to be very slow when working on files with either large stroked paths or groups containing a decent number of stroked objects, even with optimized builds ('-O3'). This affects basic operations: opening the file, selecting/de-selecting large objects or groups, zooming, dragging with the select tool (groups), switching from node tool back to the select tool (large paths) etc.
Rather extreme example file to demonstrate: https://bugs.launchpad.net/inkscape/+bug/180495/+attachment/186845/+files/vertov01.svg Example with a decent number (~700) of stroked paths in a single group: http://imgh.us/delaunay-11.svg
A related issue (AFAIU) already exists in 0.48.x with the improved visual bbox (RENDERING_BBOX) used in the 'Export Bitmap' dialog which blocks Inkscape due to live-updating the export dimensions whenever the selection changes: https://bugs.launchpad.net/inkscape/+bug/719993
All tests done on Mac OS X 10.5.8 (32bit), with debug ('-g -O0') and optimized ('-O3') builds, using GTK+/X11 2.24.4, cairo 1.10.2.
~suv