| 920 | //------------------------------------------------------------------------------ |
| 921 | |
| 922 | bool Clipper::IsContributing(const TEdge& edge) const |
| 923 | { |
| 924 | switch( m_ClipType ){ |
| 925 | case ctIntersection: |
| 926 | if ( edge.polyType == ptSubject ) |
| 927 | return Abs(edge.windCnt) == 1 && edge.windCnt2 != 0; else |
| 928 | return Abs(edge.windCnt2) > 0 && Abs(edge.windCnt) == 1; |
| 929 | case ctUnion: |
| 930 | return Abs(edge.windCnt) == 1 && edge.windCnt2 == 0; |
| 931 | case ctDifference: |
| 932 | if ( edge.polyType == ptSubject ) |
| 933 | return std::abs(edge.windCnt) == 1 && edge.windCnt2 == 0; else |
| 934 | return std::abs(edge.windCnt) == 1 && edge.windCnt2 != 0; |
| 935 | default: //case ctXor: |
| 936 | return std::abs(edge.windCnt) == 1; |
| 937 | } |
| 938 | } |
| 939 | //------------------------------------------------------------------------------ |
| 940 | |
| 941 | void Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt) |