1

How can I draw (with finger) crisp CLOSED shape on Android. I can get the series of points froim touch input and I need to put custom curved shape which corresponds (doesn't have to go exactly through the points) the points.

Jakub Kinst
  • 357
  • 2
  • 9

1 Answers1

2

Track your touch points and apply them in order to construct a Path (docs link) that can be drawn. Path is set up in such a way that you can append each point to it as they come in, and you can decide what type of connection (line, arc, bezier) to draw in between.

You can use proximity between the initial touch and current touch or similar logic to determine when to close the contour, and then just call close().

devunwired
  • 62,780
  • 12
  • 127
  • 139