summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-04-05 12:52:58 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-04-05 14:56:53 +0200
commitfcb00ac8ebe2acb429f09ef5b728b8c73a5bbc37 (patch)
tree4f9dc3b5d195e01d653619d51bc1ec1e0b5ff882 /vcl
parent48429e075fe73b858328d7287035c24744812f75 (diff)
support opacity for widget definition draw SVGs
This opacity influences the whole shape (stroke and fill). Change-Id: I82e10e07dbf2f321805b55a5f4831a513e52dab8 Reviewed-on: https://gerrit.libreoffice.org/70292 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 6124a31e21e4..3373285b8a92 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -186,14 +186,15 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
rGraphics.SetLineColor();
rGraphics.SetFillColor(Color(*rRectangle.mpFillColor));
rGraphics.DrawPolyPolygon(basegfx::B2DHomMatrix(),
- basegfx::B2DPolyPolygon(aB2DPolygon), 0.0f, nullptr);
+ basegfx::B2DPolyPolygon(aB2DPolygon),
+ 1.0 - rRectangle.mnOpacity, nullptr);
}
if (rRectangle.mpStrokeColor)
{
rGraphics.SetLineColor(Color(*rRectangle.mpStrokeColor));
rGraphics.SetFillColor();
rGraphics.DrawPolyLine(
- basegfx::B2DHomMatrix(), aB2DPolygon, 0.0f,
+ basegfx::B2DHomMatrix(), aB2DPolygon, 1.0 - rRectangle.mnOpacity,
basegfx::B2DVector(rRectangle.mnStrokeWidth, rRectangle.mnStrokeWidth),
basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false,
nullptr);
@@ -230,7 +231,8 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
{
rGraphics.SetLineColor();
rGraphics.SetFillColor(Color(*rPath.mpFillColor));
- rGraphics.DrawPolyPolygon(basegfx::B2DHomMatrix(), aPolyPolygon, 0.0f, nullptr);
+ rGraphics.DrawPolyPolygon(basegfx::B2DHomMatrix(), aPolyPolygon,
+ 1.0 - rPath.mnOpacity, nullptr);
}
if (rPath.mpStrokeColor)
{
@@ -239,7 +241,7 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
for (auto const& rPolygon : aPolyPolygon)
{
rGraphics.DrawPolyLine(
- basegfx::B2DHomMatrix(), rPolygon, 0.0f,
+ basegfx::B2DHomMatrix(), rPolygon, 1.0 - rPath.mnOpacity,
basegfx::B2DVector(rPath.mnStrokeWidth, rPath.mnStrokeWidth),
basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false,
nullptr);