emfio/qa/cppunit/emf/EmfImportTest.cxx | 4 ++-- tools/source/generic/poly.cxx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit dea3d83e9a039aaec88f5ecca32066582d1921df Author: Bartosz Kosiorek <gan...@poczta.onet.pl> AuthorDate: Mon Aug 25 00:04:00 2025 +0200 Commit: Bartosz Kosiorek <gan...@poczta.onet.pl> CommitDate: Wed Aug 27 21:47:26 2025 +0200 tdf#103859 EMF Improve interpolation of the EMR_ROUNDRECT by Bezier curve Change-Id: I9d297489415e2b36e9566aa358d5eb9a2e94c398 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190146 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index 536901272f23..15876a2b7365 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -1565,8 +1565,8 @@ CPPUNIT_TEST_FIXTURE(Test, testRoundRect) assertXPath(pDocument, aXPathPrefix + "polygonstroke[1]/line", "color", u"#ff0000"); assertXPath(pDocument, aXPathPrefix + "polypolygoncolor[2]/polypolygon", "path", - u"m100 2700c0-250 350-500 700-500h2590c350 0 700 250 700 500v990c0 250-350 500-700 " - u"500h-2590c-350 0-700-250-700-500z"); + u"m100 2700c0-230 380-500 700-500h2590c310 0 700 270 700 500v990c0 220-390 500-700 " + u"500h-2590c-320 0-700-280-700-500z"); assertXPath(pDocument, aXPathPrefix + "polypolygoncolor[2]", "color", u"#ffffff"); assertXPathContent( diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index e6e50e259df8..9ab09719c4eb 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -153,40 +153,40 @@ ImplPolygon::ImplPolygon(const tools::Rectangle& rRect, sal_uInt32 nHorzRound, mxPointAry[0] = Point(aRect.Left(), aRect.Top() + nVertRound); - mxPointAry[1] = Point(aRect.Left(), aRect.Top() + 0.5 * nVertRound); + mxPointAry[1] = Point(aRect.Left(), aRect.Top() + fKappa * nVertRound); mxFlagAry[1] = PolyFlags::Control; - mxPointAry[2] = Point(aRect.Left() + 0.5 * nHorzRound, aRect.Top()); + mxPointAry[2] = Point(aRect.Left() + fKappa * nHorzRound, aRect.Top()); mxFlagAry[2] = PolyFlags::Control; mxPointAry[3] = Point(aRect.Left() + nHorzRound, aRect.Top()); mxPointAry[4] = Point(aRect.Right() - nHorzRound, aRect.Top()); - mxPointAry[5] = Point(aRect.Right() - 0.5 * nHorzRound, aRect.Top()); + mxPointAry[5] = Point(aRect.Right() - fKappa * nHorzRound, aRect.Top()); mxFlagAry[5] = PolyFlags::Control; - mxPointAry[6] = Point(aRect.Right(), aRect.Top() + 0.5 * nVertRound); + mxPointAry[6] = Point(aRect.Right(), aRect.Top() + fKappa * nVertRound); mxFlagAry[6] = PolyFlags::Control; mxPointAry[7] = Point(aRect.Right(), aRect.Top() + nVertRound); mxPointAry[8] = Point(aRect.Right(), aRect.Bottom() - nVertRound); - mxPointAry[9] = Point(aRect.Right(), aRect.Bottom() - 0.5 * nVertRound); + mxPointAry[9] = Point(aRect.Right(), aRect.Bottom() - fKappa * nVertRound); mxFlagAry[9] = PolyFlags::Control; - mxPointAry[10] = Point(aRect.Right() - 0.5 * nHorzRound, aRect.Bottom()); + mxPointAry[10] = Point(aRect.Right() - fKappa * nHorzRound, aRect.Bottom()); mxFlagAry[10] = PolyFlags::Control; mxPointAry[11] = Point(aRect.Right() - nHorzRound, aRect.Bottom()); mxPointAry[12] = Point(aRect.Left() + nHorzRound, aRect.Bottom()); - mxPointAry[13] = Point(aRect.Left() + 0.5 * nHorzRound, aRect.Bottom()); + mxPointAry[13] = Point(aRect.Left() + fKappa * nHorzRound, aRect.Bottom()); mxFlagAry[13] = PolyFlags::Control; - mxPointAry[14] = Point(aRect.Left(), aRect.Bottom() - 0.5 * nVertRound); + mxPointAry[14] = Point(aRect.Left(), aRect.Bottom() - fKappa * nVertRound); mxFlagAry[14] = PolyFlags::Control; mxPointAry[15] = Point(aRect.Left(), aRect.Bottom() - nVertRound);