Bug 98451 - SVG: Transform scale works wrong on stroke, if Skia is enabled
Summary: SVG: Transform scale works wrong on stroke, if Skia is enabled
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg, preBibisect, regression
Depends on:
Blocks: SVG-Import Skia
  Show dependency treegraph
 
Reported: 2016-03-05 17:59 UTC by Regina Henschel
Modified: 2023-11-10 09:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
package with two svg-graphics and a document which links to the graphics (8.38 KB, application/zip)
2016-03-05 17:59 UTC, Regina Henschel
Details
Diagonal lines which are scaled (1.40 KB, image/svg+xml)
2016-03-06 17:02 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2016-03-05 17:59:06 UTC
Created attachment 123316 [details]
package with two svg-graphics and a document which links to the graphics

Open attached package. It contains a document and two svg graphics, which are linked in the document. Inserting as links guarantees, that always the original graphic is used, when testing in different versions.

The graphics contain a group with a gray rectangle and a colored line. This group is scaled by a transform-attribute.

In a correct rendering, the line is scaled together with the rectangle.

In the wrong rendering, the line is scaled in y-direction, when the rectangle is scaled in x-direction; and when the rectangle is scaled in y-direction the line is not scaled.

The rendering is correct in
Version: 4.1.6.2
Build-ID: 40ff705089295be5be0aae9b15123f687c05b0a
here on Windows 7.

The rendering is broken in
Version: 4.2.0.0.alpha0+
Build ID: 8624906bc437b242ea0df17801bc77d0f273f32c
TinderBox: Win-x86@6, Branch:master, Time: 2013-07-05_04:07:10
Comment 1 Robinson Tryon (qubit) 2016-03-06 06:10:15 UTC
TESTING on Ubuntu 14.04 64bit

(In reply to Regina Henschel from comment #0)
> Open attached package. It contains a document and two svg graphics,
> ...
> In a correct rendering, the line is scaled together with the rectangle.
> 
> In the wrong rendering, the line is scaled in y-direction, when the
> rectangle is scaled in x-direction; and when the rectangle is scaled in
> y-direction the line is not scaled.

With LO 5.2.0.0.alpha0+ (2016-02-24_23:58:47):
I believe that I'm seeing the grey line (incorrectly) scaled in the y-direction when the rectangle is scaled in the x-direction, so
Status -> NEW

I don't have a 4.1 build here to confirm the regression, but I do see the same problem in LO 4.2.8.2.

Regina: Do the SVG docs render correctly in Firefox?  (I'm testing with FF 44 here). If so, it's really easy to compare the SVGs in LibreOffice side-by-side with a browser window, and makes the written repro steps much shorter.
Comment 2 Regina Henschel 2016-03-06 12:03:34 UTC
The svg-graphics render correctly in browser Seamonkey (version 2.39), which is based on Firefox. I havn't got Firefox to test it there. They render correctly in browser Chrome (version 49.0.2623.75 m) and in the applications Batik (version1.7,  http://xmlgraphics.apache.org/batik/) and The Gimp (version 2.8.4). The rendering in Inkscape (version 0.48) is wrong.

So there are many ways to see the correct rendering.

I have tested it in LO4.1 to make clear, that it is regression.
Comment 3 Regina Henschel 2016-03-06 17:02:08 UTC
Created attachment 123349 [details]
Diagonal lines which are scaled

I'm not sure about the rendering in regard whether the lines have to stay rectangular or should become parallelograms, and in case they need to stay rectangular, what width has to be used. It is handled different in Inkscape and in browsers. I have written to w3.org for that, read https://lists.w3.org/Archives/Public/www-svg/2016Mar/0002.html
Comment 4 Regina Henschel 2016-03-07 08:19:23 UTC
The answers from the mailing list www-svg@w3.org are clear: It has to be rendered as parallelograms.

And I have come closer to the reason. The rendering is only wrong, if anti-aliasing is enabled.
Comment 5 Regina Henschel 2016-03-07 08:44:07 UTC
If such svg-graphic is use in a presentation and anit-aliasing is off, the rendering is nevertheless wrong in presentation mode. And an exported pdf has the wrong shapes.
Comment 6 Regina Henschel 2016-03-07 12:50:23 UTC
It is wrong too, if you break the svg-graphic to get draw objects.

It seems the problem is deeper. In SVG all kind of lines (line, polyline, polygon) are considered equal to some paths. But if LO breaks them up to Draw objects they are not converted to a filled path but to the Draw "line".
Comment 7 Xisco Faulí 2016-09-13 11:27:05 UTC
Adding keyword 'preBisect' as this regression was introduced before branch 4.4 and therefore it can't be bibisected as there's no bibisect repository for this branch.
Comment 8 Xisco Faulí 2017-09-29 08:51:16 UTC Comment hidden (obsolete)
Comment 9 Regina Henschel 2017-09-29 11:07:23 UTC
The problem still exists as described in Version: 6.0.0.0.alpha0+
Build ID: 6c68f38bc28bb55a4f0d53b8f38957516d3935d1
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-09-04_22:05:26
Locale: de-DE (de_DE); Calc: group
Comment 10 QA Administrators 2018-09-30 02:48:14 UTC Comment hidden (obsolete)
Comment 11 Regina Henschel 2018-09-30 10:46:17 UTC
The error is still in Version: 6.2.0.0.alpha0+ (x64)
Build ID: efe119aaa50e9f532b3fac1ef153469c80f24b80
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-10_01:36:26
Locale: de-DE (en_US); Calc: CL
Comment 12 QA Administrators 2021-04-17 04:08:09 UTC Comment hidden (obsolete)
Comment 13 Regina Henschel 2021-04-17 09:52:33 UTC
The situation is different but still wrong.
If Skia is enabled, rendering is wrong, independent from anti-aliasing setting.
If Skia is disabled, rendering is correct, independent from anti-aliasing setting.

I see the wrong rendering in Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7c6605bd2c1b27c12c4a492921e537eb4bf5a98e
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 14 QA Administrators 2023-04-18 03:23:30 UTC Comment hidden (obsolete)
Comment 15 Regina Henschel 2023-04-18 09:18:12 UTC
The rendering is still wrong when Skia is enabled and is correct, when Skia is disabled.
Tested with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4829a85d0753c93419bd46b1d50bcfa6f0f3f1da
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded
Comment 16 Sophie Sipasseuth 2023-11-10 09:31:18 UTC
Idem with:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 486ae5db6987411d5e394de94b2b077099d03856
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: threaded