Use Clipper for line clipping

This commit is contained in:
Alessandro Ranellucci 2013-11-21 14:15:38 +01:00
parent 1d6a18071a
commit 3025c77675
20 changed files with 202 additions and 211 deletions

View file

@ -41,4 +41,15 @@ PolylineCollection::chained_path_from(const Point* start_near, bool no_reverse)
return retval;
}
Point*
PolylineCollection::leftmost_point() const
{
const Point* p = NULL;
for (Polylines::const_iterator it = this->polylines.begin(); it != this->polylines.end(); ++it) {
if (p == NULL || it->points.front().x < p->x)
p = &(it->points.front());
}
return new Point (*p);
}
}