Stacked clip paths do not work when grouped with other objects

Bug #1067271 reported by Rena Kunisaki on 2012-10-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ted Janeczko

Bug Description

If an object has a clip mask, and that object is part of a group containing other, non-clipped objects, and that group is itself used as a clip mask, the non-clipped objects are omitted from the mask - they appear in the XML, but the affected area does not appear.

Attached file demonstrates the problem. The red square has a clip mask and is grouped with the yellow which does not. When this group is set as a clip mask for the blue square, the yellow square is ignored - the corresponding area of the blue square does not appear.

Version 0.48-devel-r, 2012 Oct 16, Linux x86

Rena Kunisaki (i-am-inuyasha) wrote :
su_v (suv-lp) wrote :

On Mac OS X 10.5.8 and OS X 10.7.4:
- not reproduced with Inkscape
- not reproduced with Inkscape 0.48+devel r10330, r10433, r10444, r10450
- reproduced with Inkscape 0.48+devel r10454, r10577, r11804

Regression possibly introduced with
r10451 "Merge SPCanvasArena caching layer work"

None of current web browsers (Chromium, Firefox, Opera, Safari) seem to support rendering such nested clips. Besides stable Inkscape versions (0.47, 0.48), only Squiggle (Batik 1.7, 18pre) and librsvg 2.36 render it as shown in the "Expected result" bitmap image.

tags: added: clipping regression
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.49
status: New → Confirmed
tags: added: svg
ScislaC (scislac) on 2012-11-20
tags: added: blocker
Martin Owens (doctormo) wrote :

After experimenting, I notice these things:

 1) that the inital bounding box after the mask is the size of the original large blue square. It should be the resulting two bits of the blue square instead.
 2) de-selecting and reselecting and moving the new object changes this bounding box to the size of the two bits of blue square.
 3) The second blue bit does not appear to render, even though it's accounted for in the bounding box.

Thus I conclude that the error is most likely in rendering, than it is in other parts.

Changed in inkscape:
assignee: nobody → Martin Owens (doctormo)
Rena Kunisaki (i-am-inuyasha) wrote :

I think there are two different bugs there - that the object doesn't show up when it's within the bounding box (this bug) and that the bounding box doesn't show correctly until deselecting the object.

su_v (suv-lp) wrote :

> that the bounding box doesn't show correctly until deselecting the object.

Known regression in current trunk, tracked in bug #1005085. AFAICT bug #1005085 is unrelated to the rendering issue reported here (I do recall noticeable flickering of the visible parts e.g. when rotating the clipped objects in a recreated test file as if an invisible rectangle area was actually blanking out visible parts of the clipped objects).

Ted Janeczko (janeczko-ted) wrote :

This bug was driving me nuts, so I looked into fixing it. Basically there's an issue with the order in which the clip path is painted and composited in the clip method of the DrawingItem class. The attached patch should work, although I'm not entirely sure that it's the most efficient method.

Alvin Penner (apenner) wrote :

thanks Ted, nice work!

tested and committed to rev 11943

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: Martin Owens (doctormo) → nobody
Kris (kris-degussem) on 2012-12-09
tags: removed: blocker
Martin Owens (doctormo) wrote :

Thanks Ted, I was struggling to compile trunk over here and then you fixed the issue. Awesome! couldn't test the patch for same compile reasons. not sure why.

Ted Janeczko (janeczko-ted) wrote :

My pleasure! Hope you're able to get the trunk to compile soon, Martin!

su_v (suv-lp) on 2012-12-17
Changed in inkscape:
assignee: nobody → Ted Janeczko (janeczko-ted)
su_v (suv-lp) wrote :

Follow-up report:
Bug #1110397 “trunk: opacity of clipped group is ignored (regression)”

Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers