summaryrefslogtreecommitdiff
path: root/vcl/headless/svpgdi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/headless/svpgdi.cxx')
-rw-r--r--vcl/headless/svpgdi.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index de105c5062f9..fb4514eba37d 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1525,22 +1525,20 @@ bool SvpSalGraphics::drawPolyLine(
// need to check/handle LineWidth when ObjectToDevice transformation is used
basegfx::B2DVector aLineWidth(rLineWidth);
const bool bObjectToDeviceIsIdentity(rObjectToDevice.isIdentity());
- const basegfx::B2DVector aDeviceLineWidth(bObjectToDeviceIsIdentity ? rLineWidth : rObjectToDevice * rLineWidth);
- const bool bCorrectLineWidth(!bObjectToDeviceIsIdentity && aDeviceLineWidth.getX() < 1.0 && aLineWidth.getX() >= 1.0);
- // on-demand inverse of ObjectToDevice transformation
- basegfx::B2DHomMatrix aObjectToDeviceInv;
-
- if(bCorrectLineWidth)
+ // tdf#124848 calculate-back logical LineWidth for a hairline
+ // since this implementation hands over the transformation to
+ // the graphic sub-system
+ if(aLineWidth.equalZero())
{
- if(aObjectToDeviceInv.isIdentity())
+ aLineWidth = basegfx::B2DVector(1.0, 1.0);
+
+ if(!bObjectToDeviceIsIdentity)
{
- aObjectToDeviceInv = rObjectToDevice;
+ basegfx::B2DHomMatrix aObjectToDeviceInv(rObjectToDevice);
aObjectToDeviceInv.invert();
+ aLineWidth = aObjectToDeviceInv * aLineWidth;
}
-
- // calculate-back logical LineWidth for a hairline
- aLineWidth = aObjectToDeviceInv * basegfx::B2DVector(1.0, 1.0);
}
// PixelOffset used: Need to reflect in linear transformation