// For convenience: the four basic operations OR, XOR, AND and DIFF for // two PolyPolygons. These are combinations of the above methods. To not be forced // to do evtl. already done preparations twice, You have to do the operations Yourself.
// A source preparation consists of preparing it to be seen as XOR-Rule PolyPolygon, // so it is freed of intersections, self-intersections and the orientations are corrected. // Important is that it will define the same areas as before, but is intersection-free. // As an example think about a single polygon looping in itself and having holes. To // topologically correctly handle this, it is necessary to remove all intersections and // to correct the orientations. The orientation of the isolated holes e.g. will be negative. // Topologically it is necessary to prepare each polygon which is seen as entity. It is // not sufficient just to concatenate them and prepare the result, this may be topologically // different since the simple concatenation will be seen as XOR. To work correctly, You // may need to OR those polygons.
/// prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations.
BASEGFX_DLLPUBLIC B2DPolyPolygon prepareForPolygonOperation(const B2DPolygon& rCandidate); /// prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations.
BASEGFX_DLLPUBLIC B2DPolyPolygon prepareForPolygonOperation(const B2DPolyPolygon& rCandidate);
/// OR: Return all areas where CandidateA or CandidateB exist
BASEGFX_DLLPUBLIC B2DPolyPolygon solvePolygonOperationOr(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB);
/// XOR: Return all areas where CandidateA or CandidateB exist, but not both
BASEGFX_DLLPUBLIC B2DPolyPolygon solvePolygonOperationXor(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB);
/// AND: Return all areas where CandidateA and CandidateB exist
BASEGFX_DLLPUBLIC B2DPolyPolygon solvePolygonOperationAnd(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB);
/// DIFF: Return all areas where CandidateA is not covered by CandidateB (cut B out of A)
BASEGFX_DLLPUBLIC B2DPolyPolygon solvePolygonOperationDiff(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB);
/** merge all single PolyPolygons to a single, OR-ed PolyPolygon
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.