1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 //[boost_range_reversed
11 //` Shows how to use a Boost.Geometry linestring, reversed by Boost.Range adaptor
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/linestring.hpp>
17 #include <boost/geometry/geometries/point_xy.hpp>
18 #include <boost/geometry/geometries/adapted/boost_range/reversed.hpp>
22 typedef boost::geometry::model::d2::point_xy<int> xy;
23 boost::geometry::model::linestring<xy> line;
24 line.push_back(xy(0, 0));
25 line.push_back(xy(1, 1));
28 << boost::geometry::dsv(line | boost::adaptors::reversed)
36 //[boost_range_reversed_output