about summary refs log tree commit diff stats
path: root/drawing.lua
diff options
context:
space:
mode:
Diffstat (limited to 'drawing.lua')
-rw-r--r--drawing.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/drawing.lua b/drawing.lua
index 822b3ab..34201e7 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -649,7 +649,7 @@ function Drawing.contains_point(shape, p)
     -- not supported
   elseif shape.mode == 'line' or shape.mode == 'manhattan' then
     return shape.p1 == p or shape.p2 == p
-  elseif shape.mode == 'polygon' then
+  elseif shape.mode == 'polygon' or shape.mode == 'rectangle' or shape.mode == 'square' then
     return table.find(shape.vertices, p)
   elseif shape.mode == 'circle' then
     return shape.center == p