On 24-9-2013 3:07, Markus Engel wrote:

Hi,

when working through the code I found lots of ugly-looking sections, especially things that have got to do with geometry.

Here, I just tried rewriting the code that calculates the shape of an SPEllipse:

http://bazaar.launchpad.net/~engelmarkus/inkscape/cppify/revision/11735

 

Is this the right way to go? Using 2geom wherever you can?



Quick comments:
1) using 2geom is good :)
2) In this line
   Geom::Point middlePoint = make_angle_bisector_ray(Geom::Ray(Geom::Point(), start), Geom::Ray(Geom::Point(), end)).versor();

I don't like the "undefined" Geom::Point()'s.

Cheers,
  Johan