| 1844 | //------------------------------------------------------------------------------ |
| 1845 | |
| 1846 | void Clipper::ProcessEdgesAtTopOfScanbeam(const long64 topY) |
| 1847 | { |
| 1848 | TEdge* e = m_ActiveEdges; |
| 1849 | while( e ) |
| 1850 | { |
| 1851 | //1. process maxima, treating them as if they're 'bent' horizontal edges, |
| 1852 | // but exclude maxima with horizontal edges. nb: e can't be a horizontal. |
| 1853 | if( IsMaxima(e, topY) && GetMaximaPair(e)->dx != horizontal ) |
| 1854 | { |
| 1855 | //'e' might be removed from AEL, as may any following edges so ... |
| 1856 | TEdge* ePrior = e->prevInAEL; |
| 1857 | DoMaxima(e, topY); |
| 1858 | if( !ePrior ) e = m_ActiveEdges; |
| 1859 | else e = ePrior->nextInAEL; |
| 1860 | } |
| 1861 | else |
| 1862 | { |
| 1863 | //2. promote horizontal edges, otherwise update xcurr and ycurr ... |
| 1864 | if( IsIntermediate(e, topY) && e->nextInLML->dx == horizontal ) |
| 1865 | { |
| 1866 | if (e->outIdx >= 0) |
| 1867 | { |
| 1868 | AddPolyPt(e, IntPoint(e->xtop, e->ytop)); |
| 1869 | AddHorzJoin(e->nextInLML, e->outIdx); |
| 1870 | } |
| 1871 | UpdateEdgeIntoAEL(e); |
| 1872 | AddEdgeToSEL(e); |
| 1873 | } else |
| 1874 | { |
| 1875 | //this just simplifies horizontal processing ... |
| 1876 | e->xcurr = TopX( *e, topY ); |
| 1877 | e->ycurr = topY; |
| 1878 | } |
| 1879 | e = e->nextInAEL; |
| 1880 | } |
| 1881 | } |
| 1882 | |
| 1883 | //3. Process horizontals at the top of the scanbeam ... |
| 1884 | ProcessHorizontals(); |
| 1885 | |
| 1886 | //4. Promote intermediate vertices ... |
| 1887 | e = m_ActiveEdges; |
| 1888 | while( e ) |
| 1889 | { |
| 1890 | if( IsIntermediate( e, topY ) ) |
| 1891 | { |
| 1892 | if( e->outIdx >= 0 ) AddPolyPt(e, IntPoint(e->xtop,e->ytop)); |
| 1893 | UpdateEdgeIntoAEL(e); |
| 1894 | } |
| 1895 | e = e->nextInAEL; |
| 1896 | } |
| 1897 | } |
| 1898 | //------------------------------------------------------------------------------ |
| 1899 | |
| 1900 | PolyPt* FixupOutPolygon(PolyPt *p) |
nothing calls this directly
no test coverage detected