clipping transformed objects causes unexpected results

Bug #582716 reported by Miro Dietiker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

When clipping two objects where one has at least a transform matrix, the result is not as expected.
Note that (when trying to reproduce it again and again) this only affects if "scale stroke" and "scale radii" is disabled!
Thanks to su-v we've broken down the issue to this description on irc.

Attached example shows an ellipse with transformation that gets clipped with some clip path (rectangle with radius)
The border radius after clipping is different than it was before. This seems to be because of the current transform matrix on the ellipse.

While the order of execution (first filter, then transform) may be perfectly matching SVG specs, this leads to unpredictable results from a users perspective. If a user applies two objects (no matter if transformed or not) to clip, the resulting clipping should be exactly what's been visible to the user before. No matter which scale settings are enabled (this makes absolutely no sense).

Might be related to:
https://bugs.launchpad.net/inkscape/+bug/168157

Revision history for this message
Miro Dietiker (miro-dietiker) wrote :
su_v (suv-lp)
tags: added: clipping transformations
Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 and 0.47+devel r9433 on OS X 10.5.8

The main problem IMHO is that it is not transparent for the user if an object has an explicit transformation attribute (like any transformed ellipse, star/polygon or spiral) or optimized transforms, and it's even harder to anticipated if the shape has been converted to path but not transformed after that (because the path still has the preserved transform attribute after the conversion).

Resorting to the XML Editor to check the attributes of an object to be clipped is just a workaround and not user-friendly. A "Filter properties" dialog as proposed in bug #168157 allowing transformations to be inspected and maybe modified at every level of the stack could provide a better solution.

Revision history for this message
su_v (suv-lp) wrote :

@Miro - here's a solution if you are using a recent development build: Clipping and Masking has a new option to place the clipped or masked objects automatically into a new group (which is automatically ungrouped when releasing the clip or mask, and allows easier editing of - as well as adding new objects to - the clipped or masked content). Wrapping the transformed object in a group before clipping has the side-effect that the clip-path itself is no longer transformed as well because now the clipped object (the group) doesn't have a preserved transformation matrix. The resulting clipped object looks as expected, independent of the 'Affect:' setting to scale the radii of rounded corners.

Setting to change:
'Inkscape Preferences > Clippaths and Masks > Before applying clippath or mask:'
[x] Put all clipped/masked objects into one group

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.