Re: [Boost-users] [boost.geometry] Why point coordinates are stored to SVG as integers?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Boost-users] [boost.geometry] Why point coordinates are stored to SVG as integers?

Barend
Hi Mikhail,


Op 18-7-2016 om 19:12 schreef Mikhail Matrosov:
I'm using boost::geometry::svg_mapper to save my shapes with floating point coordinates into an .svg file. It works great, but they are stored as integers. I can see this line in svg_mapper.hpp:

namespace detail { namespace svg
{
    typedef model::point<int2cs::cartesiansvg_point_type;
}}
Thus svg_point is clearly defined to have integer coordinates. However, it is not convenient - SVG handles floating point coordinated perfectly well. Why not using original type of the serialized collection and let streams handle representation?


Thanks for the tip, I have adapted the SVG mapper. It now handles doubles internally, by default

Regards, Barend


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Loading...