Bug 142204 - [EMF] SetArcDirection support
Summary: [EMF] SetArcDirection support
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2021-05-11 00:07 UTC by Valek Filippov
Modified: 2022-03-11 11:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF sample with MoveToEx/ArcTo/LineTo and ArcDirection set to 2 (CW) (212 bytes, image/x-emf)
2021-05-11 00:09 UTC, Valek Filippov
Details
Screenshot of the sample EMF file opened in MS Paint (2.25 KB, image/png)
2021-05-11 00:10 UTC, Valek Filippov
Details
EMF sample with MoveToEx/Arc/LineTo and ArcDirection set to 2 (CW) (212 bytes, image/x-emf)
2021-05-11 01:14 UTC, Valek Filippov
Details
Screenshot of the sample EMF file (Move/Arc/Line) opened in MS Paint (1.87 KB, image/png)
2021-05-11 01:15 UTC, Valek Filippov
Details
EMF sample of Chord with ArcDirection set to 2 (CW) (180 bytes, image/x-emf)
2021-05-11 01:19 UTC, Valek Filippov
Details
Screenshot of the sample EMF file (Chord) opened in MS Paint (1.94 KB, image/png)
2021-05-11 01:21 UTC, Valek Filippov
Details
EMF sample of Pie with ArcDirection set to 2 (CW) (180 bytes, image/x-emf)
2021-05-11 01:27 UTC, Valek Filippov
Details
Screenshot of the sample EMF file (Pie) opened in MS Paint (1.66 KB, image/png)
2021-05-11 01:27 UTC, Valek Filippov
Details
How it looks in LibreOffice 7.2 master (3.63 KB, image/png)
2021-05-11 07:52 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-05-11 00:07:49 UTC
Description:
LO seems to ignore SetArcDirection MR

Steps to Reproduce:
Open attached EMF sample

Actual Results:
LO draws an arc going from the left top corner counterclockwise.

Expected Results:
The arc should be drawn clockwise.


Reproducible: Always


User Profile Reset: No



Additional Info:
EMF spec says that this MR affects the direction in which Arc, ArcTo, Chord, Ellipse, Pie, Rectangle and RoundRect records draw.

For Ellipse, Rectangle and RoundRect this is probably only important in the context of PolygonFillMode.
Comment 1 Valek Filippov 2021-05-11 00:09:18 UTC
Created attachment 171848 [details]
EMF sample with MoveToEx/ArcTo/LineTo and ArcDirection set to 2 (CW)
Comment 2 Valek Filippov 2021-05-11 00:10:13 UTC
Created attachment 171849 [details]
Screenshot of the sample EMF file opened in MS Paint
Comment 3 Valek Filippov 2021-05-11 01:14:30 UTC
Created attachment 171850 [details]
EMF sample with MoveToEx/Arc/LineTo and ArcDirection set to 2 (CW)

Sample with Arc (instead of ArcTo)
Comment 4 Valek Filippov 2021-05-11 01:15:33 UTC
Created attachment 171851 [details]
Screenshot of the sample EMF file (Move/Arc/Line) opened in MS Paint
Comment 5 Valek Filippov 2021-05-11 01:19:45 UTC
Created attachment 171852 [details]
EMF sample of Chord with ArcDirection set to 2 (CW)
Comment 6 Valek Filippov 2021-05-11 01:21:49 UTC
Created attachment 171853 [details]
Screenshot of the sample EMF file (Chord) opened in MS Paint
Comment 7 Valek Filippov 2021-05-11 01:27:01 UTC
Created attachment 171854 [details]
EMF sample of Pie with ArcDirection set to 2 (CW)
Comment 8 Valek Filippov 2021-05-11 01:27:34 UTC
Created attachment 171856 [details]
Screenshot of the sample EMF file (Pie) opened in MS Paint
Comment 9 Xisco Faulí 2021-05-11 07:51:38 UTC
Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: d4f116d9576453f5974eb63db37a33c59ac53bc9
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 10 Xisco Faulí 2021-05-11 07:52:07 UTC
Created attachment 171863 [details]
How it looks in LibreOffice 7.2 master
Comment 11 Commit Notification 2022-03-10 20:20:40 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7b28920382d3820344bfc4075bac98f85e838dba

tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2022-03-11 11:46:06 UTC
Verified in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: dddee125cc32f1ad5228e598a7de04e9654e65c1
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Bartosz, thanks for fixing this issue!!
Comment 13 Commit Notification 2022-03-11 11:46:54 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/6ab0f5a11d88dc40e56eb8210ed9493973d44e27

tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION

It will be available in 7.3.3.

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

Affected users are encouraged to test the fix and report feedback.