Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70922 - in branches/release/libs/geometry/doc: . src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-04-03 03:57:52


Author: barendgehrels
Date: 2011-04-03 03:57:51 EDT (Sun, 03 Apr 2011)
New Revision: 70922
URL: http://svn.boost.org/trac/boost/changeset/70922

Log:
Merged changes with ifdefs for release branch
Properties modified:
   branches/release/libs/geometry/doc/ (props changed)
Text files modified:
   branches/release/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp | 6 +++---
   branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_overlay.hpp | 7 ++++++-
   branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_two.hpp | 7 ++++++-
   3 files changed, 15 insertions(+), 5 deletions(-)

Modified: branches/release/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp
==============================================================================
--- branches/release/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp (original)
+++ branches/release/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp 2011-04-03 03:57:51 EDT (Sun, 03 Apr 2011)
@@ -16,7 +16,7 @@
 #include <boost/geometry/geometry.hpp>
 #include <boost/geometry/geometries/geometries.hpp>
 
-#if defined(_MSC_VER)
+#if defined(HAVE_TTMATH)
 # include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
 #endif
 
@@ -29,7 +29,7 @@
     boost::geometry::model::d2::point_xy<double> p1;
     assign(p1, 1.2345, 2.3456);
 
-#if defined(_MSC_VER)
+#if defined(HAVE_TTMATH)
     boost::geometry::model::d2::point_xy<ttmath::Big<1,4> > p2;
     assign(p2, "1.2345", "2.3456"); /*< It is possible to assign coordinates with other types than the coordinate type.
         For ttmath, you can e.g. conveniently use strings. The advantage is that it then has higher precision, because
@@ -40,7 +40,7 @@
     std::cout
         << std::setprecision(20)
         << boost::geometry::dsv(p1) << std::endl
-#if defined(_MSC_VER)
+#if defined(HAVE_TTMATH)
         << boost::geometry::dsv(p2) << std::endl
 #endif
         ;

Modified: branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_overlay.hpp
==============================================================================
--- branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_overlay.hpp (original)
+++ branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_overlay.hpp 2011-04-03 03:57:51 EDT (Sun, 03 Apr 2011)
@@ -13,11 +13,15 @@
 
 #include <fstream>
 #include <boost/algorithm/string.hpp>
-#include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
+
+#if defined(HAVE_SVG)
+# include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
+#endif
 
 template <typename Geometry, typename Range>
 void create_svg(std::string const& filename, Geometry const& a, Geometry const& b, Range const& range)
 {
+#if defined(HAVE_SVG)
     std::cout << std::endl << "[$img/algorithms/" << boost::replace_all_copy(filename, ".svg", ".png") << "]" << std::endl << std::endl;
 
     typedef typename boost::geometry::point_type<Geometry>::type point_type;
@@ -38,6 +42,7 @@
         mapper.text(boost::geometry::return_centroid<point_type>(g), out.str(),
                     "fill:rgb(0,0,0);font-family:Arial;font-size:10px");
     }
+#endif
 }
 
 // NOTE: convert manually from svg to png using Inkscape ctrl-shift-E

Modified: branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_two.hpp
==============================================================================
--- branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_two.hpp (original)
+++ branches/release/libs/geometry/doc/src/examples/algorithms/create_svg_two.hpp 2011-04-03 03:57:51 EDT (Sun, 03 Apr 2011)
@@ -13,11 +13,15 @@
 
 #include <fstream>
 #include <boost/algorithm/string.hpp>
-#include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
+
+#if defined(HAVE_SVG)
+# include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
+#endif
 
 template <typename Geometry1, typename Geometry2>
 void create_svg(std::string const& filename, Geometry1 const& a, Geometry2 const& b)
 {
+#if defined(HAVE_SVG)
     std::cout << std::endl << "[$img/algorithms/" << boost::replace_all_copy(filename, ".svg", ".png") << "]" << std::endl << std::endl;
 
     typedef typename boost::geometry::point_type<Geometry1>::type point_type;
@@ -36,6 +40,7 @@
     {
         mapper.map(b, "opacity:0.8;fill:none;stroke:rgb(255,128,0);stroke-width:4;stroke-dasharray:1,7;stroke-linecap:round");
     }
+#endif
 }
 
 // NOTE: convert manually from svg to png using Inkscape ctrl-shift-E


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk