diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 23:38:45 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 23:38:45 +0000 |
commit | e223a705fa6faa83de2a6de47b55a2102f30e69f (patch) | |
tree | eb413209744336511669c924a13aadcd168b1c4d /cppcanvas/source | |
parent | 819a799b2745bef2534026c619bad6f1697e424d (diff) |
INTEGRATION: CWS aw033 (1.23.8); FILE MERGED
2008/07/11 11:44:23 aw 1.23.8.4: RESYNC: (1.24-1.25); FILE MERGED
2008/05/14 15:12:31 aw 1.23.8.3: RESYNC: (1.23-1.24); FILE MERGED
2007/12/18 14:59:58 aw 1.23.8.2: #i39532# corrected clipping changes
2007/12/12 13:22:53 aw 1.23.8.1: #i39532# clipping changes
Diffstat (limited to 'cppcanvas/source')
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index a26dba5c38d8..267abd002111 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: implrenderer.cxx,v $ - * $Revision: 1.25 $ + * $Revision: 1.26 $ * * This file is part of OpenOffice.org. * @@ -71,6 +71,8 @@ #include <basegfx/range/b2drectangle.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/polygon/b2dpolygonclipper.hxx> +#include <basegfx/polygon/b2dpolypolygoncutter.hxx> #include <canvas/canvastools.hxx> #include <vcl/canvastools.hxx> @@ -1255,17 +1257,9 @@ namespace cppcanvas rState.clipRect.Bottom()+1 ) ) ); } - rState.clip = ::basegfx::tools::correctOrientations( rState.clip ); - aClipPoly = ::basegfx::tools::correctOrientations( aClipPoly ); - - // intersect the two poly-polygons - rState.clip = ::basegfx::tools::removeAllIntersections(rState.clip); - rState.clip = ::basegfx::tools::removeNeutralPolygons(rState.clip, sal_True); - aClipPoly = ::basegfx::tools::removeAllIntersections(aClipPoly); - aClipPoly = ::basegfx::tools::removeNeutralPolygons(aClipPoly, sal_True); - rState.clip.append(aClipPoly); - rState.clip = ::basegfx::tools::removeAllIntersections(rState.clip); - rState.clip = ::basegfx::tools::removeNeutralPolygons(rState.clip, sal_False); + // AW: Simplified + rState.clip = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aClipPoly, rState.clip, true, false); } // by now, our clip resides in the OutDevState::clip @@ -1343,17 +1337,10 @@ namespace cppcanvas rClipRect.Bottom() ) ) ); rState.clipRect.SetEmpty(); - rState.clip = ::basegfx::tools::correctOrientations( rState.clip ); - aClipPoly = ::basegfx::tools::correctOrientations( aClipPoly ); - - // intersect the two poly-polygons - rState.clip = ::basegfx::tools::removeAllIntersections(rState.clip); - rState.clip = ::basegfx::tools::removeNeutralPolygons(rState.clip, sal_True); - aClipPoly = ::basegfx::tools::removeAllIntersections(aClipPoly); - aClipPoly = ::basegfx::tools::removeNeutralPolygons(aClipPoly, sal_True); - rState.clip.append(aClipPoly); - rState.clip = ::basegfx::tools::removeAllIntersections(rState.clip); - rState.clip = ::basegfx::tools::removeNeutralPolygons(rState.clip, sal_False); + + // AW: Simplified + rState.clip = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aClipPoly, rState.clip, true, false); } if( rState.clip.count() == 0 ) |