Kaydet (Commit) 0044bd80 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#38116, fdo#49438: fix double hairline border drawing some more:

These two fixes interact in a bad way:
49bd0e4e (fdo#48647)
ee42895d (fdo#49438)

The problem is that now hairline borders are detected properly, and the
double hairline borders are clipped to the right area, but the clipping
polygon actually collapses to a single line for the hairline border,
with the result that the clipped border line is an empty PolyPolygon
for e.g. a double border 3 twips wide.

Fix this by enforcing a minimum clipping polygon width of 2 units,
which seems to work nicely.

Change-Id: If9cf9f0ed6a5c837860c2313a84cd26b07734b03
üst 277b7fd3
......@@ -89,8 +89,11 @@ namespace drawinglayer
const basegfx::B2DVector aPerpendicular(basegfx::getPerpendicular(aVector));
// Get the points
const basegfx::B2DVector aLeftOff(aPerpendicular * (-0.5 * (getWidth(rViewInformation))));
const basegfx::B2DVector aRightOff(aPerpendicular * (0.5 * (getWidth(rViewInformation))));
const double fWidth(getWidth(rViewInformation));
const basegfx::B2DVector aLeftOff(
aPerpendicular * (-0.5 * std::max(fWidth, 1.0)));
const basegfx::B2DVector aRightOff(
aPerpendicular * (0.5 * std::max(fWidth, 1.0)));
const basegfx::B2DVector aSLVector( aLeftOff - ( getExtendLeftStart() * aVector ) );
clipPolygon.append( basegfx::B2DPoint( getStart() + aSLVector * 2.0 ) );
......
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