summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@me.com>2019-01-11 17:59:59 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de>2019-01-13 12:16:57 +0100
commit6e3c4ae8bca898700cde9caaff43c3a8a61eebc2 (patch)
tree56066e170824eb732f67e1af3dcb68fdada7f49c /vcl/win
parent73df1aea4f8a779241c053ab54f616f7b3a6dcb9 (diff)
tdf#122384 Added isPrinter support to WinSalGraphicsImpl::drawPolyLine
As already guessed but not been sure (see 'One more hint' in WinSalGraphicsImpl::drawPolyPolygon) the strange WinGDI transform is also needed when printing for WinSalGraphicsImpl:: drawPolyLine. Change-Id: I39f89eac0c17e524949221306723a355c6e94a17 Reviewed-on: https://gerrit.libreoffice.org/66190 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/gdiimpl.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index ec7682b14899..bb70bc3901c3 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2345,6 +2345,21 @@ bool WinSalGraphicsImpl::drawPolyLine(
aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeNone);
}
+ if(mrParent.isPrinter())
+ {
+ // tdf#122384 As metioned above in WinSalGraphicsImpl::drawPolyPolygon
+ // (look for 'One more hint: This *may* also be needed now in'...).
+ // See comments in same spot above *uregntly* before doing changes here,
+ // these comments are *still fully valid* at this place (!)
+ const Gdiplus::REAL aDpiX(aGraphics.GetDpiX());
+ const Gdiplus::REAL aDpiY(aGraphics.GetDpiY());
+
+ aGraphics.ScaleTransform(
+ Gdiplus::REAL(100.0) / aDpiX,
+ Gdiplus::REAL(100.0) / aDpiY,
+ Gdiplus::MatrixOrderAppend);
+ }
+
aGraphics.DrawPath(
&aPen,
&(*pGraphicsPath));