masking with a gradient does not work

Bug #1718743 reported by Stefano Facchini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Stefano Facchini

Bug Description

Masking with a gradient-filled shape does not work. Looking at the xml, it seems that a spurious transformation is applied to the gradient.

Oddly, if I first put the gradient-filled rect in a group on its own, everything works as expected.

Revision history for this message
Stefano Facchini (stefano-facchini) wrote :
Revision history for this message
Patrick Storz (ede123) wrote :

Seems to be a regression in master:
- working in Inkscape 0.92.2 (c522dc6d40, 2017-09-16)
- not working in Inkscape 0.92+devel (42c84a5464, 2017-09-20)

Changed in inkscape:
status: New → Confirmed
importance: Undecided → Medium
tags: added: masking regression
Revision history for this message
Stefano Facchini (stefano-facchini) wrote :

I think that the most robust way to avoid this problems is to transform the duplicate clipping/masking object directly, instead of: transforming -> duplicating -> transforming back the original.

I attach a proof-of-concept patch of what I mean. Maybe passing along pairs of <node, transformation> is not the best way to do it.

This also solves bug 1719079.

The first patch is just a clean-up (apparently the first argument of doWriteTransform is not really used in the method).

Revision history for this message
Stefano Facchini (stefano-facchini) wrote :
Revision history for this message
Stefano Facchini (stefano-facchini) wrote :
Revision history for this message
Stefano Facchini (stefano-facchini) wrote :

Improved version of the patch.

BTW is there a reason why SPClipPath::create is a static method while sp_mask_create is a function?

Revision history for this message
Mc (mc...) wrote :
Changed in inkscape:
assignee: nobody → Stefano Facchini (stefano-facchini)
milestone: none → 0.93
status: Confirmed → Fix Committed
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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