Bug 133499 - line dash with svg:stroke-linecap="square" is rendered as solid line
Summary: line dash with svg:stroke-linecap="square" is rendered as solid line
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shapes-Line
  Show dependency treegraph
 
Reported: 2020-05-29 17:01 UTC by Regina Henschel
Modified: 2021-11-03 12:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example with dashed lines (11.74 KB, application/vnd.oasis.opendocument.presentation)
2020-05-29 17:01 UTC, Regina Henschel
Details
screenshot (166.59 KB, image/png)
2020-05-29 22:23 UTC, Julien Nabet
Details
Screenshot on Windows 10 (5.57 KB, image/png)
2020-05-29 22:56 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2020-05-29 17:01:24 UTC
Created attachment 161396 [details]
Example with dashed lines

Open attached document. It contains all combinations of attribute svg:stroke-linecap at the shape with draw:style of from <draw:stroke-dash> element.

All 8 lines should be dashed, but line 5 and 6 are solid. I see the error both with and without Skia.

I see the error in Version: 7.0.0.0.alpha1+ (x64)
Build ID: 0a7341c26741f16835c9062c309e7d3a7fca8209
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

It it OK in Version: 6.4.5.0.0+ (x64)
Build ID: 70a2071ce91b71326659e645dd97996262ea309a
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL
Comment 1 Julien Nabet 2020-05-29 22:23:57 UTC
Created attachment 161410 [details]
screenshot

Here what I got on pc Debian x86-64 with master sources updated today.

Could you attach a screenshot of what you expect?
Comment 2 Regina Henschel 2020-05-29 22:56:13 UTC
Created attachment 161414 [details]
Screenshot on Windows 10

Your screenshot looks good. I have attached, how it look for me.
Comment 3 Julien Nabet 2020-05-30 06:51:06 UTC
It must be a Windows only bug since I don't reproduce this too with gen rendering.
Comment 4 Regina Henschel 2020-05-30 11:14:51 UTC
I have found now, that it is related to "Use anti-aliasing". It renders correctly, if this option is ON, and fails, if it is OFF.

Tested with Version: 7.1.0.0.alpha0+ (x64)
Build ID: 83c4f86f22dc37269ac6a038fe7de053c42aad6e
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

and
Version: 5.4.7.2 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 8; OS: Windows 6.19; UI render: default; 
Locale: de-DE (en_US); Calc: CL

Have not tested older versions yet.

Removing keywords.
Comment 5 Julien Nabet 2020-05-30 11:22:31 UTC
Indeed! If I uncheck the option, I can reproduce this.
Comment 6 V Stuart Foote 2020-05-30 13:03:14 UTC
Skia rendering, Vulkan and raster, anti-alaized or not is having some strange issues with scaling the lengths of the line dashes. Zoom-in on the slide.

Version: 7.0.0.0.beta1 (x64)
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 7 Luboš Luňák 2020-06-01 11:15:53 UTC
(In reply to Regina Henschel from comment #4)
> I have found now, that it is related to "Use anti-aliasing". It renders
> correctly, if this option is ON, and fails, if it is OFF.

IIRC there's code somewhere in VCL(?) that calls the relevant drawPolyLine() call and it depends on AntialiasingFlags::EnableB2dDraw.

(In reply to V Stuart Foote from comment #6)
> Skia rendering, Vulkan and raster, anti-alaized or not is having some
> strange issues with scaling the lengths of the line dashes. Zoom-in on the
> slide.

I don't see anything wrong, what am I supposed to see? Maybe that build doesn't include https://git.libreoffice.org/core/+/147938b5406d1d8291482d542325d708928e6589%5E%21 ?
Comment 8 Regina Henschel 2020-06-01 12:51:00 UTC
I see the error too in Version: 7.1.0.0.alpha0+ (x64)
Build ID: a0c90f1bccd9b5a349d3199746facab549f27dba
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

That build contains https://git.libreoffice.org/core/+/dbcf176d8ac1945b8f1e3c95d1401d0f1f85584d

Unfortunately in that build the check boxes in Tools > Options are broken. So you need to inspect registrymodifications.xcu directly.
I see the error, if
<item oor:path="/org.openoffice.Office.Common/Drawinglayer"><prop oor:name="AntiAliasing" oor:op="fuse"><value>false</value></prop></item>

It is OK, if
<item oor:path="/org.openoffice.Office.Common/Drawinglayer"><prop oor:name="AntiAliasing" oor:op="fuse"><value>true</value></prop></item>
Comment 9 V Stuart Foote 2020-06-01 13:02:05 UTC
(In reply to Luboš Luňák from comment #7)
> ...
> I don't see anything wrong, what am I supposed to see? Maybe that build
> doesn't include
> https://git.libreoffice.org/core/+/
> 147938b5406d1d8291482d542325d708928e6589%5E%21 ?

Yes that did not make the 7.0.0beta1 build, downloading a TB77 daily to retest with Skia.


=-ref-=
https://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-7-0&qt=range&q=147938b5406d1d8291482d542325d708928e6589
Comment 10 V Stuart Foote 2020-06-01 15:12:17 UTC
Version: 7.1.0.0.alpha0+ (x64)
Build ID: a0c90f1bccd9b5a349d3199746facab549f27dba
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Using 'Expert Configuration' dialog to toggle the controls into the user registry, edits there show the 

<item oor:path="/org.openoffice.Office.Common/Drawinglayer"><prop oor:name="AntiAliasing" oor:op="fuse"><value>true</value></prop></item>

stanza to be the problem with default GDI, OpenGL and Skia rendering. Toggling it 'false' disrupts dashes on line 5 & 6

comment 6 Issues of dash line length with Skia on zoom-in is no longer present.
Comment 11 V Stuart Foote 2021-11-03 12:53:20 UTC
With Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

toggling anti-aliasing setting to false no longer has issues with line 5 or 6 in the ODP sample for any of the rendering modes.