On 12/18/2013 02:15 AM, alvinpenner wrote:
This is an attempt to summarize the types of scaling behaviour that can occur, and to highlight a few remaining unresolved issues. Only the behaviour of the visual bbox will be discussed. In Inkscape 0.48.4 there were two types of stretching behaviour, depending on the choice of the preference for Scale Stroke Width.
Correct! I tried to get that part right some time ago. This was needed for correctly snapping the nodes (which are at the center of the stroke) while transforming an object by its visual bounding box, but also to get accurate numbers in the spin controls of the selection tool toolbar after transforming objects, even considering selections of objects of which only some could have a stroke.
The choice of the preference for Optimized/Preserved Transforms did not affect the visual appearance in Inkscape, although it did in other renderers. With the implementation of the new Cairo renderer both of these preferences now affect the visual appearance, as they should. So there are now 4 possible results.
Never realized that, and never looked at that. Thanks for your analysis and partial fix! This is tricky stuff!
There are two remaining issues which may be more difficult to solve. In case 4, no scale/preserved, there is a remaining vertical offset. The offset is actually more serious than it appears to be, because it is persistent, it does not go away even after performing a round trip by contracting the shape again. It appears to be related to the fact that the stretching was asymmetric. If you drag at a 45 degree angle, then there is no offset. This will be reported elsewhere as a bug.
The second unresolved issue is that the appearance during the drag is not the same as the appearance after releasing the object (Bug 1258271).
I believe that this second issue is quite a bit older than that, see this bug filed by Bulia in 2004:
https://bugs.launchpad.net/inkscape/+bug/165727
Unfortunately, I do not have any answers for you.
Diederik