[Libreoffice-commits] core.git: vcl/quartz
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 25 18:37:42 UTC 2020
vcl/quartz/salgdicommon.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 77638038470a93d30a82f2ece86b89eda82696f9
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Mar 25 09:40:51 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Mar 25 19:36:56 2020 +0100
Avoid CGContextSetLineWidth warning about negative line width
Change-Id: I82d37d0277e324e269674ed40592026e0097fa33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91027
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91031
Tested-by: Jenkins
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 4ca5eede4578..6489b33d1fd9 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -935,7 +935,12 @@ bool AquaSalGraphics::drawPolyLine(
CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
- CGContextSetLineWidth( maContextHolder.get(), aLineWidth.getX() );
+
+ // aLineWidth.getX() can be negative here. That causes a warning that shows up in the debugger.
+ if (aLineWidth.getX() > 0)
+ {
+ CGContextSetLineWidth( maContextHolder.get(), aLineWidth.getX() );
+ }
CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
CGContextDrawPath( maContextHolder.get(), kCGPathStroke );
maContextHolder.restoreState();
More information about the Libreoffice-commits
mailing list