Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@16
|
4
|
Chris@16
|
5 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
6 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
7
|
Chris@16
|
8 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
10 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
11
|
Chris@16
|
12 #ifndef BOOST_GEOMETRY_IO_SVG_WRITE_SVG_MULTI_HPP
|
Chris@16
|
13 #define BOOST_GEOMETRY_IO_SVG_WRITE_SVG_MULTI_HPP
|
Chris@16
|
14
|
Chris@16
|
15
|
Chris@16
|
16 #include <boost/geometry/io/svg/write_svg.hpp>
|
Chris@16
|
17
|
Chris@16
|
18
|
Chris@16
|
19 namespace boost { namespace geometry
|
Chris@16
|
20 {
|
Chris@16
|
21
|
Chris@16
|
22 #ifndef DOXYGEN_NO_DETAIL
|
Chris@16
|
23 namespace detail { namespace svg
|
Chris@16
|
24 {
|
Chris@16
|
25
|
Chris@16
|
26
|
Chris@16
|
27 template <typename MultiGeometry, typename Policy>
|
Chris@16
|
28 struct svg_multi
|
Chris@16
|
29 {
|
Chris@16
|
30 template <typename Char, typename Traits>
|
Chris@16
|
31 static inline void apply(std::basic_ostream<Char, Traits>& os,
|
Chris@16
|
32 MultiGeometry const& multi, std::string const& style, int size)
|
Chris@16
|
33 {
|
Chris@16
|
34 for (typename boost::range_iterator<MultiGeometry const>::type
|
Chris@16
|
35 it = boost::begin(multi);
|
Chris@16
|
36 it != boost::end(multi);
|
Chris@16
|
37 ++it)
|
Chris@16
|
38 {
|
Chris@16
|
39 Policy::apply(os, *it, style, size);
|
Chris@16
|
40 }
|
Chris@16
|
41
|
Chris@16
|
42 }
|
Chris@16
|
43
|
Chris@16
|
44 };
|
Chris@16
|
45
|
Chris@16
|
46
|
Chris@16
|
47
|
Chris@16
|
48 }} // namespace detail::svg
|
Chris@16
|
49 #endif // DOXYGEN_NO_DETAIL
|
Chris@16
|
50
|
Chris@16
|
51
|
Chris@16
|
52 #ifndef DOXYGEN_NO_DISPATCH
|
Chris@16
|
53 namespace dispatch
|
Chris@16
|
54 {
|
Chris@16
|
55
|
Chris@16
|
56
|
Chris@16
|
57 template <typename MultiPolygon>
|
Chris@16
|
58 struct svg<multi_polygon_tag, MultiPolygon>
|
Chris@16
|
59 : detail::svg::svg_multi
|
Chris@16
|
60 <
|
Chris@16
|
61 MultiPolygon,
|
Chris@16
|
62 detail::svg::svg_poly
|
Chris@16
|
63 <
|
Chris@16
|
64 typename boost::range_value<MultiPolygon>::type
|
Chris@16
|
65 >
|
Chris@16
|
66
|
Chris@16
|
67 >
|
Chris@16
|
68 {};
|
Chris@16
|
69
|
Chris@16
|
70
|
Chris@16
|
71 } // namespace dispatch
|
Chris@16
|
72 #endif // DOXYGEN_NO_DISPATCH
|
Chris@16
|
73
|
Chris@16
|
74
|
Chris@16
|
75 }} // namespace boost::geometry
|
Chris@16
|
76
|
Chris@16
|
77
|
Chris@16
|
78 #endif // BOOST_GEOMETRY_IO_SVG_WRITE_SVG_MULTI_HPP
|