Description: LO doesn't support SetMiterLimit Steps to Reproduce: Open attached EMF sample Actual Results: LO bevels both joins Expected Results: Only join of the left shape should be beveled Reproducible: Always User Profile Reset: No Additional Info: Probably more samples with different miter values would be required to figure out the right behavior.
Created attachment 171970 [details] EMF sample with SetMiterLimit 2 and SetMiterLimit 20
Created attachment 171971 [details] Screenshot of the sample EMF file opened in MS Paint
Created attachment 171972 [details] How it looks in LO 7.2 master from May 11, 2021
confirm in Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: 128f67e0efa02294205a1abe1be874557ecdcecd CPU threads: 4; OS: Linux 5.5; UI render: default; VCL: kf5 (cairo+xcb) Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-19_06:21:05 Calc: threaded
More information about miter is available at: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-emfplus/5ef071f3-f503-4f16-b027-7c4bcf2d1d81 https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-emf/2637d0d0-92dd-48e8-be5e-6400b4d1fc5e In vcl/win/gdi/gdiimpl.cxx there is an mehod which translate miterangle to miterlimit: case basegfx::B2DLineJoin::Miter : { const Gdiplus::REAL aMiterLimit(1.0/sin(fMiterMinimumAngle/2.0)); aPen.SetMiterLimit(aMiterLimit); // tdf#99165 MS's LineJoinMiter creates non standard conform miter additional // graphics, somewhere clipped in some distance from the edge point, dependent // of MiterLimit. The more default-like option is LineJoinMiterClipped, so use // that instead aPen.SetLineJoin(Gdiplus::LineJoinMiterClipped); break; }
Created attachment 180074 [details] EMF+ with different Line Joints and different Line Miter Minimum Angles
Created attachment 180075 [details] EMF+ This is how it should looks like (MS Paint)
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e709ebe42ad06974b822366e4eea1a6c2ee61e10 tdf#142261 EMF+ Add support for Miter Limit 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.
Created attachment 180109 [details] EMF with different Line Joints and different Line Miter Minimum Angles