diff options
author | sb <sb@openoffice.org> | 2010-02-05 09:17:48 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-02-05 09:17:48 +0100 |
commit | eec332142dbfec6a5ab3d8cf4cf1a405cbd3e30c (patch) | |
tree | 55ea7d363745c205a49ebdac6e2b2ccf296eeb37 /vcl/unx/source/gdi/salgdi.cxx | |
parent | 08e3d3d8892f40bac9b1c45ecf331e8c0f4ffcbd (diff) | |
parent | da2c680d23b67d4721aa29f740475fd6d40e2e08 (diff) |
sb111: merged in DEV300_m71
Diffstat (limited to 'vcl/unx/source/gdi/salgdi.cxx')
-rw-r--r-- | vcl/unx/source/gdi/salgdi.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 5fe2295a8fed..386be14f04d7 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1428,14 +1428,17 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly // unless it splits another trapezoid that is still active bool bSplit = false; ActiveTrapSet::iterator aActiveTrapsIt = aActiveTraps.begin(); - for(; aActiveTrapsIt != aActiveTraps.end(); ++aActiveTrapsIt ) + while(aActiveTrapsIt != aActiveTraps.end()) { XTrapezoid& rLeftTrap = aTrapVector[ *aActiveTrapsIt ]; // skip until first overlap candidate // TODO: use stl::*er_bound() instead if( IsLeftOf( aTrapezoid.left, rLeftTrap.left) ) + { + ++aActiveTrapsIt; continue; + } // in the ActiveTrapSet there are still trapezoids where // a vertical overlap with new trapezoids is no longer possible @@ -1446,15 +1449,26 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly { ActiveTrapSet::iterator it = aActiveTrapsIt; if( aActiveTrapsIt != aActiveTraps.begin() ) + { --aActiveTrapsIt; - aActiveTraps.erase( it ); + aActiveTraps.erase( it ); + ++aActiveTrapsIt; + } + else + { + aActiveTraps.erase( it ); + aActiveTrapsIt = aActiveTraps.begin(); + } continue; } // check if there is horizontal overlap // aTrapezoid.left==rLeftTrap.right is allowed though if( !IsLeftOf( aTrapezoid.left, rLeftTrap.right ) ) + { + ++aActiveTrapsIt; continue; + } // prepare to split the old trapezoid and keep its upper part // find the old trapezoids entry in the VerticalTrapSet and remove it |