Fix ymax in GROUP bounding box
authorSam Moore <[email protected]>
Thu, 14 Aug 2014 04:54:57 +0000 (12:54 +0800)
committerSam Moore <[email protected]>
Thu, 14 Aug 2014 04:54:57 +0000 (12:54 +0800)
svg-tests/circlepath.svg has the right box now

BTW: Segfaults in previous commit occur only for quadtree enabled

src/document.cpp

index 6754faa..6a86291 100644 (file)
@@ -287,7 +287,7 @@ unsigned Document::AddGroup(unsigned start_index, unsigned end_index)
                if (i == start_index || objb.y < ymin)
                        ymin = objb.y;
                if (i == start_index || (objb.y+objb.h) > ymax)
-                       ymax = objb.y;
+                       ymax = (objb.y+objb.h);
        }
        
        Rect bounds(xmin,ymin, xmax-xmin, ymax-ymin);

UCC git Repository :: git.ucc.asn.au