[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/quartz
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 3 13:19:33 UTC 2019
vcl/quartz/salgdicommon.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 0236e29bd0197e96e63bc784e6a581e50b022752
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat Jun 1 19:45:53 2019 +0200
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 3 15:18:48 2019 +0200
tdf#125506: use rObjectToDevice if needed
Use same logic as in vcl/unx/generic/gdi/gdiimpl.cxx
Regression from 16091ff88aaab9ba9103c4e369bf79b97f431f40
See https://bugs.documentfoundation.org/show_bug.cgi?id=125506#c13
Thanks to Thorsten Wagner for pinpointing
Change-Id: I7a7a8c4b3355f5621ba1603939a3757cd03e7777
Reviewed-on: https://gerrit.libreoffice.org/73319
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
(cherry picked from commit 93477d1a963e38e3319013e43835a8ffef200972)
Reviewed-on: https://gerrit.libreoffice.org/73328
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 913d2ac43f19..333c23c93035 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -874,10 +874,15 @@ bool AquaSalGraphics::drawPolyLine(
return false;
#endif
+ // need to check/handle LineWidth when ObjectToDevice transformation is used
+ const basegfx::B2DVector aDeviceLineWidths(rObjectToDevice * rLineWidths);
+ const bool bCorrectLineWidth(aDeviceLineWidths.getX() < 1.0 && rLineWidths.getX() >= 1.0);
+ const basegfx::B2DVector aLineWidths(bCorrectLineWidth ? rLineWidths : aDeviceLineWidths);
+
// #i101491# Aqua does not support B2DLineJoin::NONE; return false to use
// the fallback (own geometry preparation)
// #i104886# linejoin-mode and thus the above only applies to "fat" lines
- if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (rLineWidths.getX() > 1.3) )
+ if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (aLineWidths.getX() > 1.3) )
return false;
// Transform to DeviceCoordinates, get DeviceLineWidth, execute PixelSnapHairline
@@ -946,7 +951,7 @@ bool AquaSalGraphics::drawPolyLine(
CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
- CGContextSetLineWidth( maContextHolder.get(), rLineWidths.getX() );
+ CGContextSetLineWidth( maContextHolder.get(), aLineWidths.getX() );
CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
SAL_INFO( "vcl.cg", "CGContextDrawPath(" << maContextHolder.get() << ",kCGPathStroke)" );
CGContextDrawPath( maContextHolder.get(), kCGPathStroke );
More information about the Libreoffice-commits
mailing list