clips and masks should transform along the affected object.

Bug #351281 reported by Guillermo Espertino (Gez)
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Krzysztof Kosinski

Bug Description

When a clipped or masked object is transformed, the original clip/mask stays with its original size and position.
This makes difficult to edit the clip or mask because it's no longer aligned to the affected shape, therefore is impossible to transform precisely or use snapping.

The transformation of the affected object should affect the clip/mask as well.

Related branches

Revision history for this message
bbyak (buliabyak) wrote :

This works for me as you describe - please add a step by step use case of what does not work

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

In the attached sample, I created 2 circles on the center of the page, group them, then created a triangle over the group.
I colored the triangle to white and added blur. Then I selected the group and the triangle and created a mask.
If I touched the group and used the note tool to modify the mask, the mask was perfectly aligned to the masked object.
But, when I moved the masked object (attached sample), scale and rotate it, the mask stood in its original position when I tried to edit it again.
The transformations on the masked group weren't applied to the mask itself, which is on its original position, untransformed, while the masked object is transformed.

Revision history for this message
dopelover (dopelover) wrote :

For me it works like a charm. I can scale, move and rotate masked object. Each time mask is being transformed just like you described it should work.

I assume that the problem is not in Inkscape itself but in the way you work with the masked objects. Double click on a group of cliped or masked objects makes you go into this group and edit objects inside of the group instead of a whole group.

When mask doesn't transform aligned to cliped/masked object try to go out of a group just double clicking somewhere on a canvas, then select cliped/masked object and try to transform it.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I'm sure I'm out of the group and the mask doesn't transform aligned to the masked object.
Could you please take a look on my sample file?

Revision history for this message
dopelover (dopelover) wrote :

I've performed all the tests on your sample file and I haven't observed any improper behaviour.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

You mean you don't see this, and you see the mask path on the masked object, don't you?
If that's the case. Do you have an idea of what can be causing this in my installation and what can I do to avoid it?

Revision history for this message
dopelover (dopelover) wrote :

I did some tests again. After whole bunch of transformations (scaling, moving rotating, mirroring) mask and masked objects are still aligned. I don't have any idea of what causes your problem. Have you tried recent builds?

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I consider a compilation from fifteen minutes ago a recent build :-)

Maybe I didn't explain my problem correctly. There's no problem with the mask applied on the masked object. The mask is always in the right position. The problem is when I edit the mask, using the node editor tool.
The reference mask used for edition stays untransformed. Not the actual mask on the object.
I'll try to upload a simple screencast to illustrate the problem.

I tried to reproduce in another machine and it does exactly the same.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :
Revision history for this message
dopelover (dopelover) wrote :

You explained it well. I prepared a screencast as well. Have look at it.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

Then we aren't understanding each other. :-)
In your screencast you show with my file that the mask is aligned with the object all the time, and the masked object has the right appearance.
That's not the problem. In my computer happens exactly the same.
The problem is *editing* the mask using the node tool.
The node tool has a special option for editing masks and clips. Although the masked/clipped object has the right appearance and the mask is aligned with the object perfectly, when you use the option for editing the mask/clip shape, you get an outline of the mask in it's original, untransformed shape and position.
That's what I'm saying that should be aligned to the object. The editable mask should be synchronized with the actual mask.

Revision history for this message
dopelover (dopelover) wrote :

You were right. I didn't understand your explanation :-). I can confirm that the problem exists. Mask being edited with node tool are not aligned with masked objects after transformations. So I'm changing the status to confirmed.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

I see the same happening (as in screenshot of duplicate bug #388036) when node editing a moved(?) and duplicated ellipse that has a 'bend' LPE applied (see the test case of bug #263620 <http://launchpadlibrarian.net/28625988/LPE_crash.svg>)

Inkscape 0.46+devel r21714 on OS X 10.5.7

su_v (suv-lp)
tags: added: node-editing transformations
tags: added: clipping
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Will be fixed in the new node tool. The only way a mask/clip can become misaligned in the new tool is when you move the clipped object, turn on clip editing, and then undo.

Changed in inkscape:
status: Confirmed → In Progress
assignee: nobody → Krzysztof Kosiński (tweenk)
Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.48
Changed in inkscape:
importance: Undecided → Medium
importance: Medium → Low
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Pablo Trabajos (pajarico) wrote :

This still exists in r9934. I clipped something (it was a path with 5 sub-paths), rotated it and the clip path was rotated but displaced. Even undoing and reclipping didn't help, the clip path is still offset.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

I tried again in r9983 and it persists. Attaching a minimal testcase. No "Fit to page" was applied.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

This is what I see.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Steps:
1-Select objects at the top.
2-Right click, Set clip.
3-Use node tool and select the just clipped object. The clip path should be displaced.

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

@Pablo - do you have 'Inkscape Preferences > Transforms' set to 'preserved' mode?

I can't reproduce it (in Inkscape 0.48+devel r9989 on OS X 10.5.8) if I select and clip the elements at the top in your attached sample file - using optimized transforms, as is the default setting. I only get a similar behavior either when using shapes as clip-paths and moving the clipped shape, or as described in bug #628875 (preserved transform of parent group/layer).

See also
Bug #628875 in Inkscape: “node editing a clipping mask appears offset”
<https://bugs.launchpad.net/inkscape/+bug/628875>

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

@suv: I had "preserved" set. Using "optimized" works. However I think both should not displace the clipping path.

If I use "preserved" the problem appears, but I can select the clipping path in <defs>, remove the transform and the clipping path will be placed on the correct place. After that I can transform the clipped object again and the clipping path won't move erratically.

It seems like just clipping+preserved transforms adds a spurious transform to the clipping path.

And that bug seems like a duplicate of this.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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