From 6c7c17ed9e874080d12d82ddb500b8642a1dc87b Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Sat, 9 Feb 2013 22:07:31 +0100 Subject: [PATCH] [Fix #23] polygon:getBBox should be polygon:bbox --- polygon.lua | 2 +- shapes.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/polygon.lua b/polygon.lua index 4ad97e1..0a43782 100644 --- a/polygon.lua +++ b/polygon.lua @@ -184,7 +184,7 @@ function Polygon:clone() end -- get bounding box -function Polygon:getBBox() +function Polygon:bbox() local ulx,uly = self.vertices[1].x, self.vertices[1].y local lrx,lry = ulx,uly for i=2,#self.vertices do diff --git a/shapes.lua b/shapes.lua index a472cdd..3fadc26 100644 --- a/shapes.lua +++ b/shapes.lua @@ -281,11 +281,11 @@ function PointShape:outcircle() end function ConvexPolygonShape:bbox() - return self._polygon:getBBox() + return self._polygon:bbox() end function ConcavePolygonShape:bbox() - return self._polygon:getBBox() + return self._polygon:bbox() end function CircleShape:bbox()