dimanche 23 mars 2014

Android custom Canvas Help/Example needed


Vote count:

0




For the last two months or so I have been trying to start the development of my app, but it couldn't really get into programming as I couldn't find a solution for my initial Problem. I have been doing a lot of research and tried many different things, but nothing worked for me. Here is what I want to have:


A custom View the user can draw on with his Finger. This View should support pinch-to-zoom as well as panning. On the View I want to draw a Path (what the User draws) and some horizontal and vertical lines. These horizontal and vertical lines should always reach from one edge to the other, even if the user zooms or pans the view. (You can propably compare it to a paint/drawing app, where the user also can draw using his finger and resize the view)


Problems I noticed so far (depending on the different ways I tried to solve this):



  • the drawn path changes its position when the user zooms

  • zooming and panning don't work together properly, which results in the canvas jumping from one finger to another

  • the drawn lines get to short after zooming

  • after zooming, the line doesn't get drawn where the user touches the screen, but with an offset


I'm getting really desperated about this, because the Problem doesn't even seem to be so complicated. I would be really gratefull if someone could give me a link to a tutorial or an example which covers some of these aspects.


These are the tutorials I mainly followed until now:


So, if anyone knows any other tutorial/solution - please help me.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire