diff options
author | obo <obo@openoffice.org> | 2011-03-16 09:10:50 +0100 |
---|---|---|
committer | obo <obo@openoffice.org> | 2011-03-16 09:10:50 +0100 |
commit | 89410973000b8d1b5bedd40de61dfc15ec59ce92 (patch) | |
tree | 146dbb102e2747b7ce68b7eafb6106666a8cd932 /vcl | |
parent | 2b61765208b2ebd355b1db99a46ce7494460fa2b (diff) | |
parent | cdeae7ac60074f97a1214c486f95c1273c187c80 (diff) |
CWS-TOOLING: integrate CWS obo55
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/source/gdi/salgdi.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index dc1ec968d859..df23220ea6d5 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1217,6 +1217,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) ); // shortcut for hairline drawing to improve performance + bool bDrawnOk = true; if( bIsHairline ) { // hairlines can benefit from a simplified tesselation @@ -1225,17 +1226,13 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); // draw tesselation result - if( ! aB2DTrapVector.empty() ) - { - const int nTrapCount = aB2DTrapVector.size(); - const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); + const int nTrapCount = aB2DTrapVector.size(); + if( nTrapCount > 0 ) + bDrawnOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); - // restore the original brush GC - nBrushColor_ = aKeepBrushColor; - return bDrawOk; - } - else - return true; + // restore the original brush GC + nBrushColor_ = aKeepBrushColor; + return bDrawnOk; } // get the area polygon for the line polygon @@ -1258,19 +1255,18 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double // draw each area polypolygon component individually // to emulate the polypolygon winding rule "non-zero" - bool bDrawOk = true; const int nPolyCount = aAreaPolyPoly.count(); for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) ); - bDrawOk = drawPolyPolygon( aOnePoly, fTransparency ); - if( !bDrawOk ) + bDrawnOk = drawPolyPolygon( aOnePoly, fTransparency ); + if( !bDrawnOk ) break; } // restore the original brush GC nBrushColor_ = aKeepBrushColor; - return bDrawOk; + return bDrawnOk; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |