Index: transform.hpp =================================================================== --- transform.hpp (revision 86774) +++ transform.hpp (working copy) @@ -1,4 +1,4 @@ -// Boost.Polygon library point_data.hpp header file +// Boost.Polygon library transform.hpp header file // Copyright (c) Intel Corporation 2008. // Copyright (c) 2008-2012 Simonson Lucanus. Index: detail/polygon_45_touch.hpp =================================================================== --- detail/polygon_45_touch.hpp (revision 86774) +++ detail/polygon_45_touch.hpp (working copy) @@ -65,8 +65,8 @@ inline CountTouch& operator=(const CountTouch& count) { counts = count.counts; return *this; } inline int& operator[](int index) { std::vector >::iterator itr = - std::lower_bound(counts.begin(), counts.end(), - std::make_pair(index, int(0))); + std::lower_bound(counts.begin(), counts.end(), + std::make_pair(index, int(0))); if(itr != counts.end() && itr->first == index) { return itr->second; } Index: detail/polygon_arbitrary_formation.hpp =================================================================== --- detail/polygon_arbitrary_formation.hpp (revision 86774) +++ detail/polygon_arbitrary_formation.hpp (working copy) @@ -326,11 +326,12 @@ } else if(elm1y == elm2y) { if(elm1 == elm2) return false; - retval = less_slope(elm1.second.get(HORIZONTAL) - elm1.first.get(HORIZONTAL), - elm1.second.get(VERTICAL) - elm1.first.get(VERTICAL), - elm2.second.get(HORIZONTAL) - elm2.first.get(HORIZONTAL), - elm2.second.get(VERTICAL) - elm2.first.get(VERTICAL)); - retval = ((*justBefore_) != 0) ^ retval; + typedef typename coordinate_traits::manhattan_area_type at; + at dx1 = at(elm1.second.get(HORIZONTAL)) - at(elm1.first.get(HORIZONTAL)); + at dy1 = at(elm1.second.get(VERTICAL)) - at(elm1.first.get(VERTICAL)); + at dx2 = at(elm2.second.get(HORIZONTAL)) - at(elm2.first.get(HORIZONTAL)); + at dy2 = at(elm2.second.get(VERTICAL)) - at(elm2.first.get(VERTICAL)); + retval = ((*justBefore_) != 0) ^ less_slope(dx1, dy1, dx2, dy2); } } return retval; @@ -826,11 +827,12 @@ } else if(elm1y == elm2y) { if(elm1.pt == elm2.pt && elm1.other_pt == elm2.other_pt) return false; - retval = less_slope(elm1.other_pt.get(HORIZONTAL) - elm1.pt.get(HORIZONTAL), - elm1.other_pt.get(VERTICAL) - elm1.pt.get(VERTICAL), - elm2.other_pt.get(HORIZONTAL) - elm2.pt.get(HORIZONTAL), - elm2.other_pt.get(VERTICAL) - elm2.pt.get(VERTICAL)); - retval = ((*justBefore_) != 0) ^ retval; + typedef typename coordinate_traits::manhattan_area_type at; + at dx1 = at(elm1.other_pt.get(HORIZONTAL)) - at(elm1.pt.get(HORIZONTAL)); + at dy1 = at(elm1.other_pt.get(VERTICAL)) - at(elm1.pt.get(VERTICAL)); + at dx2 = at(elm2.other_pt.get(HORIZONTAL)) - at(elm2.pt.get(HORIZONTAL)); + at dy2 = at(elm2.other_pt.get(VERTICAL)) - at(elm2.pt.get(VERTICAL)); + retval = ((*justBefore_) != 0) ^ less_slope(dx1, dy1, dx2, dy2); } } return retval; @@ -1233,10 +1235,11 @@ inline less_incoming_count(Point point) : pt_(point) {} inline bool operator () (const std::pair, int>, active_tail_arbitrary*>& elm1, const std::pair, int>, active_tail_arbitrary*>& elm2) const { - Unit dx1 = elm1.first.first.first.get(HORIZONTAL) - elm1.first.first.second.get(HORIZONTAL); - Unit dx2 = elm2.first.first.first.get(HORIZONTAL) - elm2.first.first.second.get(HORIZONTAL); - Unit dy1 = elm1.first.first.first.get(VERTICAL) - elm1.first.first.second.get(VERTICAL); - Unit dy2 = elm2.first.first.first.get(VERTICAL) - elm2.first.first.second.get(VERTICAL); + typedef typename coordinate_traits::manhattan_area_type at; + at dx1 = at(elm1.first.first.first.get(HORIZONTAL)) - at(elm1.first.first.second.get(HORIZONTAL)); + at dx2 = at(elm2.first.first.first.get(HORIZONTAL)) - at(elm2.first.first.second.get(HORIZONTAL)); + at dy1 = at(elm1.first.first.first.get(VERTICAL)) - at(elm1.first.first.second.get(VERTICAL)); + at dy2 = at(elm2.first.first.first.get(VERTICAL)) - at(elm2.first.first.second.get(VERTICAL)); return scanline_base::less_slope(dx1, dy1, dx2, dy2); } };