[Libreoffice-commits] core.git: vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 15 19:38:43 UTC 2020
vcl/inc/FileDefinitionWidgetDraw.hxx | 4 ++++
vcl/inc/salgdi.hxx | 3 ---
vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 10 +++++++++-
vcl/source/gdi/salgdilayout.cxx | 9 ++-------
4 files changed, 15 insertions(+), 11 deletions(-)
New commits:
commit 47cc520dcc7deec8ee527505da5f28be195e1fb6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 14:20:38 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 20:38:05 2020 +0100
DrawGradient variant only called by FileDefinitionWidgetDraw
which doesn't do any mirroring on any of its drawing calls.
Change-Id: I4f531ee01147b34f36a6d4235f3340bd1a8e62ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107769
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/FileDefinitionWidgetDraw.hxx b/vcl/inc/FileDefinitionWidgetDraw.hxx
index 0ca50c304aad..881316c2f4a2 100644
--- a/vcl/inc/FileDefinitionWidgetDraw.hxx
+++ b/vcl/inc/FileDefinitionWidgetDraw.hxx
@@ -69,6 +69,10 @@ public:
static void drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap, const SalBitmap& rTransparentBitmap);
+
+ static void implDrawGradient(SalGraphics& rGraphics,
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const SalGradient& rGradient);
};
} // end vcl namespace
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index ce31d808e98b..92a587841a9c 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -274,9 +274,6 @@ public:
const Gradient& rGradient,
const OutputDevice& rOutDev);
- bool DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon,
- SalGradient const & rGradient);
-
// CopyArea --> No RasterOp, but ClipRegion
void CopyArea(
tools::Long nDestX, tools::Long nDestY,
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 16a8fe52efbe..bcc999a79eac 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -237,6 +237,13 @@ void FileDefinitionWidgetDraw::drawBitmap(SalGraphics& rGraphics, const SalTwoRe
rGraphics.drawBitmap(rPosAry, rSalBitmap, rTransparentBitmap);
}
+void FileDefinitionWidgetDraw::implDrawGradient(SalGraphics& rGraphics,
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const SalGradient& rGradient)
+{
+ rGraphics.implDrawGradient(rPolyPolygon, rGradient);
+}
+
namespace
{
void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics, tools::Long nX,
@@ -319,7 +326,8 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
aColor.SetTransparency(rStop.mfOpacity * (1.0f - rRectangle.mnOpacity));
aGradient.maStops.emplace_back(aColor, rStop.mfOffset);
}
- rGraphics.DrawGradient(basegfx::B2DPolyPolygon(aB2DPolygon), aGradient);
+ FileDefinitionWidgetDraw::implDrawGradient(
+ rGraphics, basegfx::B2DPolyPolygon(aB2DPolygon), aGradient);
}
}
if (rRectangle.mpStrokeColor)
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 59ec974c2dd3..ed2a2ed21df2 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -557,18 +557,13 @@ bool SalGraphics::DrawGradient(const tools::PolyPolygon& rPolyPoly, const Gradie
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
{
- tools::PolyPolygon aFinal(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
- return drawGradient(aFinal, rGradient);
+ tools::PolyPolygon aMirrored(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
+ return drawGradient(aMirrored, rGradient);
}
return drawGradient( rPolyPoly, rGradient );
}
-bool SalGraphics::DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rSalGradient)
-{
- return implDrawGradient(rPolyPolygon, rSalGradient);
-}
-
void SalGraphics::CopyArea( tools::Long nDestX, tools::Long nDestY,
tools::Long nSrcX, tools::Long nSrcY,
tools::Long nSrcWidth, tools::Long nSrcHeight,
More information about the Libreoffice-commits
mailing list