Bug 97657 - INSERT: SVG clippath mask not supported
Summary: INSERT: SVG clippath mask not supported
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords: filter:svg
: 116205 (view as bug list)
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2016-02-08 20:01 UTC by Yousuf Philips (jay) (retired)
Modified: 2024-03-27 15:34 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
svg file - works as of LO 7.3.4.2 (38.40 KB, application/zip)
2016-02-08 20:01 UTC, Yousuf Philips (jay) (retired)
Details
another sample - works as of LO 7.3.4.2 (894 bytes, image/svg+xml)
2016-02-17 11:55 UTC, Xisco Faulí
Details
another sample 2 (6.74 KB, image/svg+xml)
2016-02-23 16:23 UTC, Xisco Faulí
Details
another sample 3 - works as of LO 7.3.4.2 (4.14 KB, image/svg+xml)
2016-02-23 16:52 UTC, Xisco Faulí
Details
minimal clipping sample - SVG - works with master 2022-07-26_06.20.53 (1.62 KB, image/svg+xml)
2022-07-26 16:35 UTC, Petr Špaček
Details
minimal clipping sample - PNG render from Inkscape - works with master 2022-07-26_06.20.53 (1.55 KB, image/png)
2022-07-26 16:36 UTC, Petr Špaček
Details
minimal clipping sample - screenshot from LO 7.3.4.2 (missing clip) - works with master 2022-07-26_06.20.53 (21.07 KB, image/png)
2022-07-26 16:37 UTC, Petr Špaček
Details
SVG with clipmask inserted to Writer document with master against 7.5.0 (40.12 KB, image/png)
2022-07-26 16:52 UTC, V Stuart Foote
Details
LibreOffice 24.8 master vs Firefox (73.75 KB, image/png)
2024-03-27 15:34 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-02-08 20:01:39 UTC
Created attachment 122456 [details]
svg file - works as of LO 7.3.4.2

Steps:
1) Open Writer
2) Unzip attached zip file
3) Insert m/masking-path-04-b.svg
4) Notice that their isnt a second 'Clip Test' and its text isnt masked by the displayed background.

The relevant SVG code is below.

<defs>
  <clipPath id="sample" clipPathUnits="userSpaceOnUse">
    <text x="45" y="270" font-size="100" font-family="Impact">Clip Test</text>
  </clipPath>
</defs>

<g>
  <image xlink:href="../images/bluesquidj.png" preserveAspectRatio="none" x="20" y="170" width="410" height="160" clip-path="url(#sample)"/>
</g>

Version: 5.2.0.0.alpha0+
Build ID: 6d68e88a0fc5a54bbb826379163bd0b9c6eae0fb
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-02-08_08:05:38
Locale: en-US (en_US.UTF-8)
Comment 1 Buovjaga 2016-02-11 12:04:02 UTC
Confirmed.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: a6f876d45bd4e41a7143594a6cb11b6893a0f620
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-11_00:07:38
Locale: fi-FI (fi_FI)
Comment 2 Xisco Faulí 2016-02-17 11:55:33 UTC
Created attachment 122721 [details]
another sample - works as of LO 7.3.4.2
Comment 3 Xisco Faulí 2016-02-23 16:23:35 UTC
Created attachment 122917 [details]
another sample 2
Comment 4 Xisco Faulí 2016-02-23 16:52:28 UTC
Created attachment 122920 [details]
another sample 3 - works as of LO 7.3.4.2
Comment 5 Xisco Faulí 2016-03-11 11:10:24 UTC
sample 2 crashes after d5649ae7b76278cb3155f951d6327157c7c92b65. I'm into it.
Comment 6 Commit Notification 2016-03-30 08:44:57 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c29716d349353997bf7cdde63cd9f867c5baeb6

tdf#97657: SVGIO: Don't iterate over parent's clip-paths...

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Xisco Faulí 2016-09-15 21:30:41 UTC
sample 2 is still wrong
Comment 8 V Stuart Foote 2018-03-05 19:18:32 UTC
*** Bug 116205 has been marked as a duplicate of this bug. ***
Comment 9 QA Administrators 2019-03-06 03:42:47 UTC Comment hidden (obsolete)
Comment 10 tomaskeb 2019-07-15 18:01:18 UTC
Still present in 6.3.0.1

Verze: 6.3.0.1 (x64)
ID sestavení: 41ac97386aba908b6db860cfb4cfe2da871886ae
Vlákna CPU: 4; OS: Windows 10.0; Vykreslování UI: GL; VCL: win; 
Národní prostředí: cs-CZ (cs_CZ); UI-Language: cs-CZ
Calc: threaded
Comment 11 QA Administrators 2021-09-19 03:45:49 UTC Comment hidden (obsolete)
Comment 12 V Stuart Foote 2022-07-18 14:03:08 UTC
@Xisco, good here as well, with see also bug 97539?
Comment 13 Petr Špaček 2022-07-26 16:22:04 UTC Comment hidden (obsolete)
Comment 14 Petr Špaček 2022-07-26 16:23:18 UTC
(In reply to Petr Špaček from comment #13)
> I confirm this problem still exists in LibreOffice 7.3.4.2 30(Build:2).

Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: cs-CZ (en_US.UTF-8); UI: en-US
7.3.4-2
Calc: threaded
Comment 15 V Stuart Foote 2022-07-26 16:32:28 UTC
(In reply to Petr Špaček from comment #14)
> (In reply to Petr Špaček from comment #13)
> > I confirm this problem still exists in LibreOffice 7.3.4.2 30(Build:2).
> 
> Version: 7.3.4.2 / LibreOffice Community
> Build ID: 30(Build:2)
> CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
> Locale: cs-CZ (en_US.UTF-8); UI: en-US
> 7.3.4-2
> Calc: threaded

The work on bug 97539 is not yet in a release build. You should test a current build [1] of master against 7.5.0 or a nightly against 7.3.6 or 7.4.0.2; or look for the release of 7.3.6 or 7.4.1 [2]

=-ref-=
[1] https://dev-builds.libreoffice.org/daily/
[2] http://downloadarchive.documentfoundation.org/libreoffice/old/
Comment 16 Petr Špaček 2022-07-26 16:35:37 UTC
Created attachment 181422 [details]
minimal clipping sample - SVG - works with master 2022-07-26_06.20.53
Comment 17 Petr Špaček 2022-07-26 16:36:03 UTC
Created attachment 181423 [details]
minimal clipping sample - PNG render from Inkscape - works with master 2022-07-26_06.20.53
Comment 18 Petr Špaček 2022-07-26 16:37:41 UTC
Created attachment 181424 [details]
minimal clipping sample - screenshot from LO 7.3.4.2 (missing clip) - works with master 2022-07-26_06.20.53
Comment 19 V Stuart Foote 2022-07-26 16:52:36 UTC
Created attachment 181425 [details]
SVG with clipmask inserted to Writer document with master against 7.5.0

(In reply to Petr Špaček from comment #18)
> Created attachment 181424 [details]
> minimal clipping sample - screenshot from LO 7.3.4.2 (missing clip)

Please see comment 15, and this clip is from current master against 7.5.0. Attachment 181422 [details] SVG inserted into Writer document.
Comment 20 V Stuart Foote 2022-07-26 17:11:21 UTC
But, the comment 3 insertion of attachment 122917 [details] shows masking paths remain incorrect
Comment 21 Petr Špaček 2022-07-26 17:40:47 UTC
(In reply to V Stuart Foote from comment #15)
> The work on bug 97539 is not yet in a release build. You should test a
> current build [1] of master against 7.5.0 or a nightly against 7.3.6 or
> 7.4.0.2; or look for the release of 7.3.6 or 7.4.1 [2]

I just tested with build
https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@tb87-TDF/2022-07-26_06.20.53/

Conclusion:
- Minimal clipping sample https://bugs.documentfoundation.org/attachment.cgi?id=181422 now works. 
- The more complex example https://bugs.documentfoundation.org/attachment.cgi?id=122917 is still broken.
Comment 22 Xisco Faulí 2023-06-22 13:23:03 UTC
(In reply to Petr Špaček from comment #21)
> (In reply to V Stuart Foote from comment #15)
> > The work on bug 97539 is not yet in a release build. You should test a
> > current build [1] of master against 7.5.0 or a nightly against 7.3.6 or
> > 7.4.0.2; or look for the release of 7.3.6 or 7.4.1 [2]
> 
> I just tested with build
> https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@tb87-
> TDF/2022-07-26_06.20.53/
> 
> Conclusion:
> - Minimal clipping sample
> https://bugs.documentfoundation.org/attachment.cgi?id=181422 now works.

This was fixed with 82c0a363abbceac6464b62c3571aa3225415c7db
Comment 23 Xisco Faulí 2023-06-22 13:27:04 UTC
(In reply to Petr Špaček from comment #21)
> - The more complex example
> https://bugs.documentfoundation.org/attachment.cgi?id=122917 is still broken.

The situation improved with b0c2e580a1c5b055295d303ebb9c9e905ab4890c although it's not perfect yet
Comment 24 Stéphane Guillou (stragu) 2023-11-06 10:14:03 UTC
(In reply to Petr Špaček from comment #21)
> - The more complex example
> https://bugs.documentfoundation.org/attachment.cgi?id=122917 is still broken.

Still current in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 31fb3045dabdb27d913712f3abcade315e3ea9bd
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 25 Xisco Faulí 2024-03-27 15:32:59 UTC
attachment 122917 [details] looks much nicer after feb4e0890b883940ec6964375293727ac6229f1c
Comment 26 Xisco Faulí 2024-03-27 15:34:02 UTC
Created attachment 193353 [details]
LibreOffice 24.8 master vs Firefox