[Boost-bugs] [Boost C++ Libraries] #9427: svg_mapper bugs

Subject: [Boost-bugs] [Boost C++ Libraries] #9427: svg_mapper bugs
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-23 10:15:53


#9427: svg_mapper bugs
------------------------------+---------------------------
 Reporter: yuyoyuppe | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!C++
 #include <iostream>
 #include <fstream>

 #include <boost/geometry.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
 #include <boost/geometry/geometries/polygon.hpp>

 void main()
 {
         typedef boost::geometry::model::d2::point_xy<double> point_type;

         point_type a(10, 10);

         boost::geometry::model::polygon<point_type> b;
         boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", b);

         std::ofstream svg("my_map.svg");
         boost::geometry::svg_mapper<point_type> mapper(svg, 100, 100);

         //mapper.add(a);
         mapper.add(b);

         //mapper.map(a, "fill-
 opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2");
         mapper.map(b, "fill-
 opacity:0.3;fill:rgb(51,51,153);stroke:rgb(51,51,153);stroke-width:2");
 }
   }}}
 }}}


 This code can produce 2 kinds of suspicious behavior:[[BR]]

 1)If I output only single point(a), it's coordinates are invalid(svg
 output fragment: ''circle cx="-2147483648" cy="-2147483648"'').[[BR]]

 2)If I add polygon to the output(a and b), I get more relevant output, but
 still invalid(svg output fragment: ''circle cx="1000" cy="0"'').



 I use msvssp4 with debug-x64 configuration.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9427>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC