Added support for partial overlaps in getArea.