Kaydet (Commit) 6d0005d9 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

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
üst b98ce8b9
...@@ -237,6 +237,16 @@ namespace drawinglayer ...@@ -237,6 +237,16 @@ namespace drawinglayer
fLineWidth = aLineWidth.getLength(); 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 bHasPoints(false);
bool bTryWorked(false); bool bTryWorked(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment