diff options
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygonclipper.cxx | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx index 360263a4f91b..f0e8ede6a27d 100644 --- a/basegfx/source/polygon/b2dpolygonclipper.cxx +++ b/basegfx/source/polygon/b2dpolygonclipper.cxx @@ -414,35 +414,10 @@ namespace basegfx // check for simplification with ranges if !bStroke (handling as stroke is more simple), // but also only when bInside, else the simplification may lead to recursive calls (see // calls to clipPolyPolygonOnPolyPolygon in clipPolyPolygonOnRange and clipPolygonOnRange) - if(bInside) + if (bInside && basegfx::tools::isRectangle(rClip)) { // #i125349# detect if both given PolyPolygons are indeed ranges - bool bBothRectangle(false); - - if(basegfx::tools::isRectangle(rCandidate)) - { - if(basegfx::tools::isRectangle(rClip)) - { - // both are ranges - bBothRectangle = true; - } - } - else if(basegfx::tools::isRectangle(rClip)) - { - if(basegfx::tools::isRectangle(rCandidate)) - { - // both are ranges - bBothRectangle = true; - } - else - { - // rClip is rectangle -> clip rCandidate on rRectangle, use the much - // cheaper and numerically more stable clipping against a range - return clipPolyPolygonOnRange(rCandidate, rClip.getB2DRange(), bInside, bStroke); - } - } - - if(bBothRectangle) + if (basegfx::tools::isRectangle(rCandidate)) { // both are rectangle if(rCandidate.getB2DRange().equal(rClip.getB2DRange())) @@ -472,6 +447,12 @@ namespace basegfx } } } + else + { + // rClip is rectangle -> clip rCandidate on rRectangle, use the much + // cheaper and numerically more stable clipping against a range + return clipPolyPolygonOnRange(rCandidate, rClip.getB2DRange(), bInside, bStroke); + } } // area clipping |