Bug 98254 - linecap round is missing for zero-length line and for zero-length path
Summary: linecap round is missing for zero-length line and for zero-length path
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 99005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-28 16:41 UTC by Regina Henschel
Modified: 2023-05-07 07:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
zero-length segments with linecap "round" (1.20 KB, image/svg+xml)
2016-02-28 16:41 UTC, Regina Henschel
Details
Example of own objects with zero-length line segments (9.45 KB, application/vnd.oasis.opendocument.graphics)
2016-02-28 16:45 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-02-28 16:41:11 UTC
Created attachment 123056 [details]
zero-length segments with linecap "round"

In SVG import, the linecaps are missing, if the line segment has zero-length. But in the SVG spec you read in https://www.w3.org/TR/SVG/painting.html#StrokeProperties
"A subpath (see Paths) consisting of a single moveto shall not be stroked. Any zero length subpath shall not be stroked if the ‘stroke-linecap’ property has a value of butt but shall be stroked if the ‘stroke-linecap’ property has a value of round or square, producing respectively a circle or a square centered at the given point. Examples of zero length subpaths include 'M 10,10 L 10,10', 'M 20,20 h 0', 'M 30,30 z' and 'M 40,40 c 0,0 0,0 0,0'."
and in https://www.w3.org/TR/SVG/implnote.html#PathElementImplementationNotes
"As mentioned in Stroke Properties, linecaps must be painted for zero length subpaths when ‘stroke-linecap’ has a value of round or square."

The ODF specification (ODF1.2 section 20.164) has no own text for the attribute "svg:stroke-linecap" but refers to SVG. And the draw:path element refers to the attribute svg:d. Therefore the linecaps should be drawn in case of value "round" and "square" for Draw elements as well.

Such caps on zero-length segments should result in a circle or square respectively. Opening the attached file in Inkscape, Batik, Chrome or Seamonkey, you can see, that the caps are drawn too for zero-length lines and polylines.

Because the caps of zero-length segments are not drawn in case of our own objects, it is likely, that the relevant code is not in svgio but in basegfx.
Comment 1 Regina Henschel 2016-02-28 16:45:00 UTC
Created attachment 123057 [details]
Example of own objects with zero-length line segments

The zero-length line has been produced with the UI, the other zero-length line segments were produced by editing the source. All objects are named and can be accessed via navigator.
Comment 2 Buovjaga 2016-03-09 08:38:37 UTC
Confirmed.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: b89feb8018bf3610faf01e73995d576f6566e20b
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-03-07_03:36:17
Locale: fi-FI (fi_FI)
Comment 3 Regina Henschel 2016-03-31 21:42:04 UTC
*** Bug 99005 has been marked as a duplicate of this bug. ***
Comment 4 Regina Henschel 2017-01-28 18:49:20 UTC
In Version: 5.4.0.0.alpha0+
Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40
Locale: de-DE (de_DE); Calc: group

I see the linecaps, if anti-aliasing is off. If anti-aliasing is on, the linecaps are not rendered.
Comment 5 QA Administrators 2018-01-29 03:30:46 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2018-11-06 14:49:52 UTC
The error still exists in Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL
Comment 7 QA Administrators 2019-11-07 03:33:23 UTC Comment hidden (obsolete)
Comment 8 Regina Henschel 2019-11-07 12:02:46 UTC
The error is still, that the caps are not drawn, if anti-aliasing is on.
Tested in Version: 6.4.0.0.alpha1+ (x64)
Build ID: 7c6226bee72805db7f0e567ca9f06c786a7d0da2
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 9 Regina Henschel 2021-05-06 07:15:37 UTC
If Skia is enabled, the zero length lines are drawn now in edit mode. But they are missing in presentation mode. And they are still missing, if Skia is disabled.

Tested with Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9c930c4f3109d123c0831d0fcecf9c8b32e5bbc7
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 10 QA Administrators 2023-05-07 03:16:41 UTC Comment hidden (obsolete)
Comment 11 Regina Henschel 2023-05-07 07:43:42 UTC
Still not OK:
With Skia disabled the dots are missing in edit and show mode as well.
With Skia enabled the dots are in edit mode, but missing in show mode.

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: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded