diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2020-03-05 19:24:30 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2020-03-06 10:10:55 +0100 |
commit | dd117712bd5692f7bf3870ba91572a0bab54ab86 (patch) | |
tree | bde473f22e43cc320e3960c331de7051d01ad77e /vcl/quartz/salgdicommon.cxx | |
parent | a3c8951da607d63ac7ffc76a062bb76208ca5ff3 (diff) |
tdf#124848 partial refactor hairline logic
With the handover of transformations to line
draw calls it is no longer feasible to detect
and prepare LineWidth stuff when the old
office definition for hairlnes is used, a
line width of zero. It was managed in the
system-independent part, but now may have to
be prepared in logic and not discrete (pixel)
coordinates. To do so, find and cleanup all
places where 1/1.0 was used as hairline line
width. Adapt all seven graphic subsystems to
handle the line width == 0/0.0 cases
accordingly. Test as good as possible.
Change-Id: I2badc045474dcd51612e50597b8406a55d9dc863
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90057
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/quartz/salgdicommon.cxx')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index a526790bb907..4ca5eede4578 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -835,10 +835,11 @@ bool AquaSalGraphics::drawPolyLine( return false; #endif - // need to check/handle LineWidth when ObjectToDevice transformation is used - const basegfx::B2DVector aDeviceLineWidth(rObjectToDevice * rLineWidth); - const bool bCorrectLineWidth(aDeviceLineWidth.getX() < 1.0 && rLineWidth.getX() >= 1.0); - const basegfx::B2DVector aLineWidth(bCorrectLineWidth ? rLineWidth : aDeviceLineWidth); + // tdf#124848 get correct LineWidth in discrete coordinates, + // take hairline case into account + const basegfx::B2DVector aLineWidth(rLineWidth.equalZero() + ? basegfx::B2DVector(1.0, 1.0) + : rObjectToDevice * rLineWidth); // #i101491# Aqua does not support B2DLineJoin::NONE; return false to use // the fallback (own geometry preparation) |