https://bugs.documentfoundation.org/show_bug.cgi?id=99102

--- Comment #6 from Regina Henschel <rb.hensc...@t-online.de> ---
One error is in case basegfx::B2DLineJoin::Miter in
WinSalGraphicsImpl::drawPolyLine, in /core/vcl/win/gdi/gdiimpl.cxx

Currently it is
             case basegfx::B2DLineJoin::Miter :
             {
                 const Gdiplus::REAL aMiterLimit(15.0); 
                 aPen.SetMiterLimit(aMiterLimit);
                 aPen.SetLineJoin(Gdiplus::LineJoinMiter);
                 break;
             }

But the type "Gdiplus::LineJoinMiter" acts different than LO. The correct type
is "Gdiplus::LineJoinMiterClipped" see
https://msdn.microsoft.com/en-us/library/windows/desktop/ms534148%28v=vs.85%29.aspx

Therefore it should be in content
            case basegfx::B2DLineJoin::Miter :
            {
                const Gdiplus::REAL aMiterLimit(1/sin(7.5*F_PI180));
                aPen.SetMiterLimit(aMiterLimit);
                aPen.SetLineJoin(Gdiplus::LineJoinMiterClipped);
                break;
            }

There exist the general formula
    miter length = 1 / sin (phi/2 )
where phi is the angle between the lines. As Gdi+ expects a miter limit and LO
uses a minimum angle, you have to convert it. Currently LO has only default 15°
as minimum angle. Making the angle variable is work in progress.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to