summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-11-03 07:42:23 +0000
committerPascal Junck <pjunck@openoffice.org>2004-11-03 07:42:23 +0000
commit2ef4ac7855d3fd0ac8fa8db99f3873f46da7bffb (patch)
tree977079a53bb6d1b47deb5f7c78189c8510105bad /tools/source
parent4c8a701c17f9a7731682bebcb823e8ecf952d3ab (diff)
INTEGRATION: CWS aw019 (1.7.60); FILE MERGED
2004/10/20 17:00:14 aw 1.7.60.1: #i34831#
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/poly2.cxx43
1 files changed, 28 insertions, 15 deletions
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index e8e8a15112d2..5aba76263408 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: poly2.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: kz $ $Date: 2004-06-10 11:35:45 $
+ * last change: $Author: pjunck $ $Date: 2004-11-03 08:42:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -814,7 +814,8 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
{
// simple merge all contained parts (OR)
aMergePolyPolygonA.append(aMergePolyPolygonB);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
break;
}
@@ -822,16 +823,20 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
{
// take selected poly 2..n (is in Polygon B), merge them, flipdirections
// and merge with poly 1
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonB, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
+ aMergePolyPolygonB = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonB);
+ aMergePolyPolygonB = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonB, sal_True);
aMergePolyPolygonB.flip();
aMergePolyPolygonA.append(aMergePolyPolygonB);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
// #72995# one more call to resolve self intersections which
// may have been built by substracting (see bug)
//aMergePolyPolygonA.Merge(FALSE);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
break;
}
@@ -841,22 +846,27 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
// has no direct support for this, we first compute the
// intersection and the union of the two polygons, and
// then subtract the intersection from the union
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonB, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
+ aMergePolyPolygonB = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonB);
+ aMergePolyPolygonB = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonB, sal_True);
::basegfx::B2DPolyPolygon aAintersectsB( aMergePolyPolygonA );
// A /\ B
aAintersectsB.append(aMergePolyPolygonB);
- ::basegfx::tools::removeIntersections(aAintersectsB, sal_False, sal_True);
+ aAintersectsB = ::basegfx::tools::removeAllIntersections(aAintersectsB);
+ aAintersectsB = ::basegfx::tools::removeNeutralPolygons(aAintersectsB, sal_False);
// A + B
aMergePolyPolygonA.append(aMergePolyPolygonB);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
// (A+B) \ (A/\B)
aAintersectsB.flip();
aMergePolyPolygonA.append(aAintersectsB);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
break;
}
@@ -864,10 +874,13 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
case GPC_INT:
{
// cut poly 1 against polys 2..n (AND)
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonB, sal_False);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_True);
+ aMergePolyPolygonB = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonB);
+ aMergePolyPolygonB = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonB, sal_True);
aMergePolyPolygonA.append(aMergePolyPolygonB);
- ::basegfx::tools::removeIntersections(aMergePolyPolygonA, sal_False, sal_True);
+ aMergePolyPolygonA = ::basegfx::tools::removeAllIntersections(aMergePolyPolygonA);
+ aMergePolyPolygonA = ::basegfx::tools::removeNeutralPolygons(aMergePolyPolygonA, sal_False);
break;
}
}