| 1781 | |
| 1782 | |
| 1783 | void ClipperBase::IntersectEdges(Active& e1, Active& e2, const Point64& pt) |
| 1784 | { |
| 1785 | //MANAGE OPEN PATH INTERSECTIONS SEPARATELY ... |
| 1786 | if (has_open_paths_ && (IsOpen(e1) || IsOpen(e2))) |
| 1787 | { |
| 1788 | if (IsOpen(e1) && IsOpen(e2)) return; |
| 1789 | Active* edge_o, * edge_c; |
| 1790 | if (IsOpen(e1)) |
| 1791 | { |
| 1792 | edge_o = &e1; |
| 1793 | edge_c = &e2; |
| 1794 | } |
| 1795 | else |
| 1796 | { |
| 1797 | edge_o = &e2; |
| 1798 | edge_c = &e1; |
| 1799 | } |
| 1800 | if (IsJoined(*edge_c)) Split(*edge_c, pt); // needed for safety |
| 1801 | |
| 1802 | if (abs(edge_c->wind_cnt) != 1) return; |
| 1803 | switch (cliptype_) |
| 1804 | { |
| 1805 | case ClipType::Union: |
| 1806 | if (!IsHotEdge(*edge_c)) return; |
| 1807 | break; |
| 1808 | default: |
| 1809 | if (edge_c->local_min->polytype == PathType::Subject) |
| 1810 | return; |
| 1811 | } |
| 1812 | |
| 1813 | switch (fillrule_) |
| 1814 | { |
| 1815 | case FillRule::Positive: |
| 1816 | if (edge_c->wind_cnt != 1) return; |
| 1817 | break; |
| 1818 | case FillRule::Negative: |
| 1819 | if (edge_c->wind_cnt != -1) return; |
| 1820 | break; |
| 1821 | default: |
| 1822 | if (std::abs(edge_c->wind_cnt) != 1) return; |
| 1823 | } |
| 1824 | |
| 1825 | #ifdef USINGZ |
| 1826 | OutPt* resultOp; |
| 1827 | #endif |
| 1828 | //toggle contribution ... |
| 1829 | if (IsHotEdge(*edge_o)) |
| 1830 | { |
| 1831 | #ifdef USINGZ |
| 1832 | resultOp = AddOutPt(*edge_o, pt); |
| 1833 | #else |
| 1834 | AddOutPt(*edge_o, pt); |
| 1835 | #endif |
| 1836 | if (IsFront(*edge_o)) edge_o->outrec->front_edge = nullptr; |
| 1837 | else edge_o->outrec->back_edge = nullptr; |
| 1838 | edge_o->outrec = nullptr; |
| 1839 | } |
| 1840 |
nothing calls this directly
no test coverage detected