summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Graphics_GDI.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@me.com>2020-03-05 19:24:30 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2020-03-06 10:10:55 +0100
commitdd117712bd5692f7bf3870ba91572a0bab54ab86 (patch)
treebde473f22e43cc320e3960c331de7051d01ad77e /vcl/qt5/Qt5Graphics_GDI.cxx
parenta3c8951da607d63ac7ffc76a062bb76208ca5ff3 (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/qt5/Qt5Graphics_GDI.cxx')
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 38866ae96320..eb43811466d4 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -369,7 +369,11 @@ bool Qt5Graphics::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
{
aPolyPolygonLine = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aPolyPolygonLine);
}
- const basegfx::B2DVector aLineWidth(rObjectToDevice * rLineWidth);
+
+ // 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);
// setup poly-polygon path
QPainterPath aPath;