This commit is contained in:
Kartik K. Agaram 2022-05-16 09:45:30 -07:00
parent dc1f74b490
commit ff1d4d988a

View File

@ -721,7 +721,7 @@ end
function contains_point(shape, p)
if shape.mode == 'freehand' then
-- not supported
elseif shape.mode == 'line' then
elseif shape.mode == 'line' or shape.mode == 'manhattan' then
return shape.p1 == p or shape.p2 == p
elseif shape.mode == 'polygon' then
return table.find(shape.vertices, p)
@ -733,6 +733,7 @@ function contains_point(shape, p)
elseif shape.mode == 'deleted' then
-- already done
else
print(shape.mode)
assert(false)
end
end