Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drawing curved line

 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to allow user to write on screen of device.Like users put on his finger on one end and scrolls finger on screen then he put off his finger from screen and I want to highlight that entire area where user has moved his finger.

I can draw the line when user give two separate touch on screen but can not solve above problem.

please help
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A program that does something similar is already bundled with the SDK; look for FingerPaint application.

What it basically does is applies a Touch Listener, gets co-ordinates of all the places where the user touches the screen and joins adjacent points using a Bezier curve. The path generated in this operation is drawn on the canvas.
 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply.Yes you are right I found that application in ApiDemos.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic