r/howdidtheycodeit • u/idontcare1littlebit • Nov 14 '23
How do they make the click-to-draw polygon selection tools in apps like Ring
6
Upvotes
r/howdidtheycodeit • u/idontcare1littlebit • Nov 14 '23
10
u/gravelPoop Nov 14 '23
if you mean area selection in general? For example for a mouse input you store x and y coordinates on mouse click and again on mouse up store x and y. Then you draw rectangle based on start xy and end xy (necessary info for drawing rectangle can be formed from those values).
-2
u/Toror Nov 15 '23
This seems like the ideal question for chatGPT