Android Question Draw A Line

Terradrones

Active Member
Licensed User
Hi All

I use a Canvas to plot the Topo Points that I pick up with either a Total Station or a GPS.

What I would like to do is to let the Surveyor connect the Points up with either Lines or Arcs. This way the Surveyor can semi complete the Drawing in the Field and back at the Office the drawing gets exported as a DXF File, which can then be imported in most CAD programs.

Here is my problem: once I activated the "Line" command and I touch the screen for the first time, the program looks for the Topo Point closest to my finger and snaps onto that Point. As I pull my finger over the screen, a line is drawn from the snapped Point to my finger. Depending how many times I move my finger, hundred of lines can be drawn. But I do not want it. When I slide my finger to a new position, the program must erase the old Line. Only when I lift my finger off the screen, must a permanently Line be drawn.

Any idea or hint how I can achieve this please?
 

klaus

Expert
Licensed User
Longtime User
Use two Panels and two Canvases, one for the drawing and another one for the temporary drawings.
Before drawing a new line, erase the previous one.
With TOUCHUP erase the temporary line and draw the definive one.

Attached a small demo project.
 

Attachments

  • DrawLine.zip
    9 KB · Views: 217
Upvote 0

Terradrones

Active Member
Licensed User
Use two Panels and two Canvases, one for the drawing and another one for the temporary drawings.
Before drawing a new line, erase the previous one.
With TOUCHUP erase the temporary line and draw the definive one.

Attached a small demo project.
Thank you very much Klaus.
 
Upvote 0

Similar Threads

Top