Add HC:shapesInRange(x1,y1, x2,y2)

Returns a set of shapes that are enclosed in the rectangle
(x1,y1)-(x2,y2).
This commit is contained in:
Matthias Richter 2012-07-10 16:35:27 +02:00
parent 317cce31c6
commit de82e88ddf

View File

@ -129,6 +129,10 @@ function HC:activeShapes()
end
end
function HC:shapesInRange(x1,y1, x2,y2)
return self._hash:inRange(x1,y1, x2,y2)
end
function HC:addPolygon(...)
return self:addShape(newPolygonShape(...))
end