diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-26 19:13:31 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-26 19:28:55 +0200 |
commit | 6d0005d95f20a326fe308a7c59dd2801f0d0b241 (patch) | |
tree | 43ea467615728d8023c9003e1ffc8498f2e8467e /drawinglayer | |
parent | b98ce8b9c5201a61a60a9f7010e5ddfafd6fcecd (diff) |
fdo#74336 draw hairline if line width is small
RenderPolygonStrokePrimitive2D draws a simple hairline if the
line width is less than 1.0 (and less than 1.5 if no AA is used)
so in tryDrawPolygonStrokePrimitive2DDirect we need to reflect
this behaviour - otherwise the lines are drawn too small.
Change-Id: Icd3d8f35a00346b1d624b6df010f43ed21968d04
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 73d12f3ebedc..1a4db9512bd5 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -237,6 +237,16 @@ namespace drawinglayer fLineWidth = aLineWidth.getLength(); } + // draw simple hairline for small line widths + // see also RenderPolygonStrokePrimitive2D which is used if this try fails + bool bIsAntiAliasing = getOptionsDrawinglayer().IsAntiAliasing(); + if ( (basegfx::fTools::lessOrEqual(fLineWidth, 1.0) && bIsAntiAliasing) + || (basegfx::fTools::lessOrEqual(fLineWidth, 1.5) && !bIsAntiAliasing)) + { + // draw simple hairline + fLineWidth = 0.0; + } + bool bHasPoints(false); bool bTryWorked(false); |