1
0
Fork 0

Fixed another special case in the calc_point_inside() algorithm

This commit is contained in:
Ralf Gerlich 2008-01-05 20:19:33 +01:00
parent 56fb5065b1
commit a8f76d3efc

View file

@ -845,10 +845,15 @@ static void intersect_yline_with_contour( double yline, TGContourNode *node, TGP
} }
if (ymax-ymin<SG_EPSILON) { if (ymax-ymin<SG_EPSILON) {
// cout << "intersect_yline_with_contour() line is nearly y-parallel" << endl; // cout << "intersect_yline_with_contour() edge is nearly y-parallel" << endl;
/* The line is nearly y-parallel, so add both ends */
xcuts.push_back(p0.x()); if (yline-ymin<SG_EPSILON) {
xcuts.push_back(p1.x()); /* The edge coincides with the yline so add both ends */
xcuts.push_back(p0.x());
xcuts.push_back(p1.x());
}
// else the edge does not intersect
continue;
} }
if (yline-ymin<SG_EPSILON) { if (yline-ymin<SG_EPSILON) {