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/source/outdev/line.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/source/outdev/line.cxx')
-rw-r--r-- | vcl/source/outdev/line.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 3332ab711a24..e88dd383e7f3 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -116,7 +116,6 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) // at least transform with double precision to device coordinates; this will // avoid pixel snap of single, appended lines const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation()); - const basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); basegfx::B2DPolygon aB2DPolyLine; aB2DPolyLine.append(basegfx::B2DPoint(rStartPt.X(), rStartPt.Y())); @@ -129,7 +128,8 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) basegfx::B2DHomMatrix(), aB2DPolyLine, 0.0, - aB2DLineWidth, + // tdf#124848 hairline + basegfx::B2DVector::getEmptyVector(), nullptr, // MM01 basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, @@ -241,7 +241,8 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin basegfx::B2DHomMatrix(), rB2DPolygon, 0.0, - basegfx::B2DVector(1.0,1.0), + // tdf#124848 hairline + basegfx::B2DVector::getEmptyVector(), nullptr, // MM01 basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, |