Fix bounding box of rectangles with wide outlines.
authorDavid Robillard <d@drobilla.net>
Thu, 8 Jan 2015 23:24:27 +0000 (18:24 -0500)
committerDavid Robillard <d@drobilla.net>
Thu, 8 Jan 2015 23:36:10 +0000 (18:36 -0500)
libs/canvas/rectangle.cc

index 0014958e909344aee4735666abf2152e642cffbe..364f6c5996e790c40a8808d12aeac77e71cd49e1 100644 (file)
@@ -147,7 +147,7 @@ Rectangle::compute_bounding_box () const
 {
        if (!_rect.empty()) {
                Rect r = _rect.fix ();
-               _bounding_box = r;
+               _bounding_box = r.expand (_outline_width + 0.5);
        }
 
        _bounding_box_dirty = false;