Skip to content
  • Hans Breuer's avatar
    path: Fix bezier bounding box calculation glitches · 7ef29f3c
    Hans Breuer authored
    Without a 'pointy join' there is no point in calculating the overshot,
    actually this was growing the bounding box arbitrarily. (First line
    of bezier-extreme.dia)
    
    Also handle slightly degenerated bezier where the control point and
    the start or end point are in the same place. Now we are using the
    other control point to have a direction for add_arrow_rectangle()
    in bicubicbezier2D_bbox(). Otherwise there would be no bounding box
    contribution from line ends of this kind (see second line of
    bezier-extreme.dia)
    
    Having this fix also seems to be a precondition for properly behaving
    StdPath::move_handle(). Previously, e.g. with commit 14e05d51
    it was possible to go over the constraints implemented, presumably
    due to bounding box miscalculations leading to wrong handle positions.
    
    Still with line-join round the bezier is drawn a bit outside of the box.
    7ef29f3c