diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2023-04-24 05:08:00 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2023-04-24 08:24:09 +0200 |
commit | 12e23067fd0acad3e06df50cefaa0a2cd73df3b5 (patch) | |
tree | c9445c1a9c47f4177a4d16e951bdfde45e326d9f /drawinglayer | |
parent | 30df7198f96ef23b4925e60a1b35144668749ec4 (diff) |
EMF+ Minor optimization and clean up code of DrawBeziers
Change-Id: Id560b3d3a6182270853fd05a6f2d1e44452c0013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150894
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/tools/emfphelperdata.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 94c4c32f026f..a1e9b3b7adce 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -1340,7 +1340,6 @@ namespace emfplushelper { sal_uInt32 aCount; float x1, y1, x2, y2, x3, y3, x4, y4; - ::basegfx::B2DPoint aStartPoint, aControlPointA, aControlPointB, aEndPoint; ::basegfx::B2DPolygon aPolygon; rMS.ReadUInt32(aCount); SAL_INFO("drawinglayer.emf", "EMF+\t DrawBeziers slot: " << (flags & 0xff)); @@ -1359,8 +1358,7 @@ namespace emfplushelper ReadPoint(rMS, x1, y1, flags); // We need to add first starting point - aStartPoint = Map(x1, y1); - aPolygon.append(aStartPoint); + aPolygon.append(Map(x1, y1)); SAL_INFO("drawinglayer.emf", "EMF+\t Bezier starting point: " << x1 << "," << y1); for (sal_uInt32 i = 4; i <= aCount; i += 3) @@ -1372,13 +1370,7 @@ namespace emfplushelper SAL_INFO("drawinglayer.emf", "EMF+\t Bezier points: " << x2 << "," << y2 << " " << x3 << "," << y3 << " " << x4 << "," << y4); - - aControlPointA = Map(x2, y2); - aControlPointB = Map(x3, y3); - aEndPoint = Map(x4, y4); - aPolygon.appendBezierSegment(aControlPointA, aControlPointB, aEndPoint); - // The ending coordinate of one Bezier curve is the starting coordinate of the next. - aStartPoint = aEndPoint; + aPolygon.appendBezierSegment(Map(x2, y2), Map(x3, y3), Map(x4, y4)); } EMFPPlusDrawPolygon(::basegfx::B2DPolyPolygon(aPolygon), flags & 0xff); break; |