mask/clippath in style= has no effect, only in attr

Bug #167357 reported by Knutux-users
20
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

Standalone "mask" attribute works ('mask=url(#name)'),
but moving it to style (as 'style="mask: url(#name)"')
ignores a mask.
Most probably this also applies to clip-path property

Tags: clipping
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Yes, this is the result of a very old misdesign: a clippath
is a property of an object, not of SPStyle. It will require
quite a bit of refactoring to fix this.

Revision history for this message
Dregoth (dregoth) wrote :

Originator: NO

Is there any chance that this bug will be solved in the near future? I was
about to submit it again when I read this report, and saw that it remains
an open issue.

It seems Batik when rendering Java graphics with its Graphics2D
implementation uses the style attribute to do a lot of things, and eUML2
generates diagrams in exactly this way, so I'm having to patch diagrams by
hand every time. Is there something I could contribute to help in
implementing this?

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Originator: NO

dregoth: ideally, submit a patch :)

this is in fact a slightly cumbersome issue, due to the way the
clippath/mask are stored and used in inkscape architecture. Maybe if you
raise this issue again on the devel list, someone will find time to look
into it.

prkos (prkos)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
RemiE (remi-emonet) wrote :

I want to vote for this bug as I am also encountering this inconvenience with Batik generated svg files.

Attached to this comment is a kind of workaround: an xslt file that copies clip-path property found in the style attribute to a clip-path attribute.

It can be run with any xslt processor (e.g. with xsltproc: 'xsltproc clean-svg-for-inkscape.xsl yourGeneratedSvg.svg > enrichedSvg.svg') or using directly an xsl transformer in Java.

(the xsl file is half generated so it could probably be cleaner)

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

update: see bug #324849 “svg lose clipping when opening in inkscape”

«Thomas Holder wrote on 2009-04-30:
fixed with workaround in rev 21260. So far clipping will not be lost, but clip-path will not be editable either.»

tags: added: clipping
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Fixed for both masks and clip paths in .92.4 and 1.1-dev (6b4d57f, 2020-04-01), probably by the workaround mentioned in bug #324849.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
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.