Lines Matching defs:to

21  * nothing unusual in this implementation, so nothing special to say
117 // 2 versions of the Scan() series to move the scanline to a given position withou actually computing coverages
118 void Shape::Scan(float &pos, int &curP, float to, float step)
124 if ( pos == to ) {
133 Direction const d = (pos < to) ? DOWNWARDS : UPWARDS;
136 // until we reach the wanted position to.
137 // don't forget to update curP and pos when we're done
139 while ( ( d == DOWNWARDS && curPt < numberOfPoints() && getPoint(curPt).x[1] <= to) ||
140 ( d == UPWARDS && curPt > 0 && getPoint(curPt - 1).x[1] >= to) )
144 // treat a new point: remove and add edges incident to it
177 // we salvage the edge upNo to plug the edges we'll be addingat its place
205 CreateEdge(neNo, to, step);
215 CreateEdge(dnNo,to,step);
227 CreateEdge(upNo,to,step);
245 CreateEdge(cb, to, step);
257 pos = to;
262 pos = to;
267 AvanceEdge(cb, to, true, step);
275 void Shape::QuickScan(float &pos,int &curP, float to, bool /*doSort*/, float step)
281 if ( pos == to ) {
290 Direction const d = (pos < to) ? DOWNWARDS : UPWARDS;
293 while ( (d == DOWNWARDS && curPt < numberOfPoints() && getPoint(curPt ).x[1] <= to) ||
294 (d == UPWARDS && curPt > 0 && getPoint(curPt - 1).x[1] >= to) )
334 CreateEdge(dnNo, to, step);
346 CreateEdge(cb, to, step);
358 pos = to;
362 pos = to;
366 AvanceEdge(cb, to, true, step);
607 // direct scan to a given position. goes through the edge list to keep only the ones intersecting the target sweepline
609 void Shape::DirectScan(float &pos, int &curP, float to, float step)
615 if ( pos == to ) {
619 if ( pos < to ) {
622 // until we reach the wanted position to.
623 // don't forget to update curP and pos when we're done
625 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
645 CreateEdge(i, to, step);
653 pos = to;
660 while ( curPt > 0 && getPoint(curPt-1).x[1] >= to ) {
681 CreateEdge(i, to, step);
689 pos = to;
695 pos = to;
700 AvanceEdge(cb, to, true, step);
708 void Shape::DirectQuickScan(float &pos, int &curP, float to, bool /*doSort*/, float step)
714 if ( pos == to ) {
718 if ( pos < to ) {
721 // until we reach the wanted position to.
722 // don't forget to update curP and pos when we're done
724 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
740 CreateEdge(i, to, step);
748 pos = to;
755 while ( curPt > 0 && getPoint(curPt-1).x[1] >= to ) {
771 CreateEdge(i, to, step);
779 pos = to;
784 pos = to;
787 AvanceEdge(cb, to, true, step);
798 // are added or removed to these rectangles, one trapezoid for each edge destroyed or edge crossing
801 void Shape::Scan(float &pos, int &curP, float to, FloatLigne *line, bool exact, float step)
807 if ( pos >= to ) {
811 // first step: the rectangles since we read the sweepline left to right, we know the
827 to - swrData[lb].curY,
829 to - swrData[cb].curY,0.0);
843 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
877 DestroyEdge(cb, to, line);
893 DestroyEdge(upNo, to, line);
899 CreateEdge(dnNo, to, step);
906 CreateEdge(dnNo, to, step);
919 CreateEdge(cb, to, step);
931 pos = to;
935 pos = to;
940 AvanceEdge(cb, to, line, exact, step);
949 void Shape::Scan(float &pos, int &curP, float to, FillRule directed, BitLigne *line, bool exact, float step)
955 if ( pos >= to ) {
980 // doesn't behave correctly; no way i know to do this without a ConvertToShape()
1022 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
1074 CreateEdge(dnNo, to, step);
1082 CreateEdge(dnNo, to, step);
1095 CreateEdge(cb, to, step);
1107 pos = to;
1110 pos = to;
1115 AvanceEdge(cb, to, line, exact, step);
1122 void Shape::Scan(float &pos, int &curP, float to, AlphaLigne *line, bool exact, float step)
1128 if ( pos >= to ) {
1133 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
1184 CreateEdge(dnNo, to, step);
1191 CreateEdge(dnNo, to, step);
1204 CreateEdge(cb, to, step);
1216 pos = to;
1219 pos = to;
1224 AvanceEdge(cb, to, line, exact, step);
1232 void Shape::QuickScan(float &pos, int &curP, float to, FloatLigne* line, float step)
1238 if ( pos >= to ) {
1261 to - swrData[lastB].curY,
1263 to - swrData[cb].curY,
1285 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
1313 DestroyEdge(cb, to, line);
1326 DestroyEdge(upNo, to, line);
1328 CreateEdge(dnNo, to, step);
1332 CreateEdge(dnNo, to, step);
1343 CreateEdge(cb, to, step);
1355 pos=to;
1358 pos = to;
1361 AvanceEdge(cb, to, line, true, step);
1371 void Shape::QuickScan(float &pos, int &curP, float to, FillRule directed, BitLigne* line, float step)
1377 if ( pos >= to ) {
1399 // doesn't behave correctly; no way i know to do this without a ConvertToShape()
1436 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
1480 CreateEdge(dnNo, to, step);
1483 CreateEdge(dnNo, to, step);
1494 CreateEdge(cb, to, step);
1506 pos = to;
1509 pos = to;
1512 AvanceEdge(cb, to, line, true, step);
1521 void Shape::QuickScan(float &pos, int &curP, float to, AlphaLigne* line, float step)
1526 if ( pos >= to ) {
1531 while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) {
1574 CreateEdge(dnNo, to, step);
1578 CreateEdge(dnNo, to, step);
1589 CreateEdge(cb, to, step);
1601 pos = to;
1604 pos = to;
1607 AvanceEdge(cb, to, line, true, step);
1619 void Shape::CreateEdge(int no, float to, float step)
1648 swrData[no].calcX = swrData[no].curX + (to - step - swrData[no].curY) * swrData[no].dxdy;
1653 void Shape::AvanceEdge(int no, float to, bool exact, float step)
1669 swrData[no].calcX = stp[0] + ((to - stp[1]) * dir[0]) / dir[1];
1678 swrData[no].curY = to;
1685 void Shape::DestroyEdge(int no, float to, FloatLigne* line)
1692 to - swrData[no].curY,
1694 to - swrData[no].lastY,
1701 -(to - swrData[no].lastY),
1703 -(to - swrData[no].curY),
1713 -(to - swrData[no].curY),
1715 -(to - swrData[no].lastY),
1722 to - swrData[no].lastY,
1724 to - swrData[no].curY,
1733 void Shape::AvanceEdge(int no, float to, FloatLigne *line, bool exact, float step)
1735 AvanceEdge(no,to,exact,step);
1742 to - swrData[no].curY,
1744 to - swrData[no].lastY,
1751 -(to - swrData[no].lastY),
1753 -(to - swrData[no].curY),
1763 -(to - swrData[no].curY),
1765 -(to - swrData[no].lastY),
1772 to - swrData[no].lastY,
1774 to - swrData[no].curY,
1810 void Shape::AvanceEdge(int no, float to, BitLigne *line, bool exact, float step)
1812 AvanceEdge(no, to, exact, step);
1882 void Shape::AvanceEdge(int no, float to, AlphaLigne *line, bool exact, float step)
1884 AvanceEdge(no,to,exact,step);
1929 * \param numberDown Filled in with the number of edges coming exiting P to go below.