Boost logo

Boost Users :

Subject: [Boost-users] [boost.geometry] Why point coordinates are stored to SVG as integers?
From: Mikhail Matrosov (mikhail.matrosov_at_[hidden])
Date: 2016-07-18 13:12:47


Hello,

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<int, 2, cs::cartesian> svg_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?

-----
Best regards, Mikhail Matrosov



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net