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

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9427: svg_mapper bugs
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-23 12:28:31


#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
Resolution: | Keywords:
-------------------------------+---------------------------

Comment (by yuyoyuppe):

 Replying to [comment:1 mloskot]:
> I see you've diagnosed the problem well, would you be able to provide
 patch? It would speed things up a lot.

 I did a quick debugging and discovered that the reason of the first case
 behavior was initializing transformation matrix(svg_mapper.hpp:248) with
 invalid values, because it uses bounding box, which has zero-length side
 if only one point was supplied to svg_mapper instance. Which is why
 division by zero happenes at map_transformer.hpp:119-120.[[BR]]

 Since the situation where svg_mapper object'll have only one point is a
 degenerated case, I think it's more like a design issue, than a bug.
 However it's possible to include this case by adding something like this
 {{{
 BOOST_ASSERT_MSG(+std::numeric_limits<type>::infinity() != sx &&
 -std::numeric_limits<type>::infinity() != sx, "svg_mapper cannot contain
 only one point");
 }}}
 at map_transformer.hpp:121.

 And regarding second point, I was wrong because of my own error - not
 paying enough attention:).[[BR]]

 Thank you.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9427#comment:2>
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