| 754 | //------------------------------------------------------------------------------ |
| 755 | |
| 756 | bool Clipper::Execute(ClipType clipType, Polygons &solution, |
| 757 | PolyFillType subjFillType, PolyFillType clipFillType) |
| 758 | { |
| 759 | if( m_ExecuteLocked ) return false; |
| 760 | bool succeeded; |
| 761 | try { |
| 762 | m_ExecuteLocked = true; |
| 763 | solution.resize(0); |
| 764 | Reset(); |
| 765 | if (!m_CurrentLM ) |
| 766 | { |
| 767 | m_ExecuteLocked = false; |
| 768 | return true; |
| 769 | } |
| 770 | m_SubjFillType = subjFillType; |
| 771 | m_ClipFillType = clipFillType; |
| 772 | m_ClipType = clipType; |
| 773 | |
| 774 | long64 botY = PopScanbeam(); |
| 775 | do { |
| 776 | InsertLocalMinimaIntoAEL(botY); |
| 777 | ClearHorzJoins(); |
| 778 | ProcessHorizontals(); |
| 779 | long64 topY = PopScanbeam(); |
| 780 | succeeded = ProcessIntersections(topY); |
| 781 | if (succeeded) ProcessEdgesAtTopOfScanbeam(topY); |
| 782 | botY = topY; |
| 783 | } while( succeeded && m_Scanbeam ); |
| 784 | |
| 785 | //build the return polygons ... |
| 786 | if (succeeded) BuildResult(solution); |
| 787 | } |
| 788 | catch(...) { |
| 789 | ClearJoins(); |
| 790 | ClearHorzJoins(); |
| 791 | solution.resize(0); |
| 792 | succeeded = false; |
| 793 | } |
| 794 | ClearJoins(); |
| 795 | ClearHorzJoins(); |
| 796 | DisposeAllPolyPts(); |
| 797 | m_ExecuteLocked = false; |
| 798 | return succeeded; |
| 799 | } |
| 800 | //------------------------------------------------------------------------------ |
| 801 | |
| 802 | void Clipper::InsertScanbeam(const long64 Y) |
no test coverage detected