I am looking for a way to check if a drawn path becomes closed, when the path is being drawn by lines created when a cursor is moved with the arrow keys (Imagine drawing lines to make a circle using the arrow keys). I can get the lines to draw, but I can't figure out how to check when the path makes a closed "shape"/area.
If anyone has a good idea of how I can check when a path becomes closed, please let me know!
Check if Path is Closed
● ARCHIVED · READ-ONLY
-
-
Do you have a way to record the start and end locations of the shape? If so, check that they are at the same location.
-
I don't think I can make that comparison, since the "end point" of the shape can be any part of the line, not just the start point. Imagine drawing a "6", where the end of the tail is the start point, the cursor draws the rest, then closes in the middle, making a closed circle. I need to detect when that circle becomes closed.