First of all I'm sorry for my English language because it is not perfect.
This is my code to moving, zooming image:
http://www.mediafire.com/view/6572cu99v9942xd/SandboxView.java
I want to rotate image also with that point called x=250 and y=200, How can I do that with saving zoom and move image?
call Canvas.concat(Matrix) before drawing anything on the canvas
Related
Using an example found here:
http://www.vogella.com/tutorials/AndroidTouch/article.html I'm able to draw a path every time a finger touches the screen and that works great, Is there any way that I can capture that drawn path and reproduce it in another view in other coordinates? Like capturing the full drawn image and reproducing it scaled in a segment of the other view?
Sorry for my bad english
You can save your drawn image and save it as a bitmap. Then you can scale it with Matrix or Canvas and redraw it by calling to where you want to draw
I need some activity with image cropping, but without getting crop image, just need coordinates angles of rectangle area on image which i can move and resize. How i can make this or where i can find such library with this functional? Sorry for my bad English.
For your purpose you better to use Android Canvas. When you touch a particular point you can get details of that point using 'OnTouch'(http://developer.android.com/reference/android/view/View.OnTouchListener.html) method in android.
I am using the Multitouch Controller made by Luke Hutchison found here
https://code.google.com/p/android-multitouch-controller/
My problem is this. I can place an image onto the canvas. I can select it, move it, rotate it and scale it perfectly fine. The problem is I also allow the user to move the canvas by translating it on drag. On the screen the images seem to appear in the correct location following the translation of the entire canvas. The problem is trying to select them afterwards.
I don't know if it's an issue with the touch point after the canvas translation not taking into account the new canvas location/offset or the location of the images haven't been updated with the canvas translation. Does anyone have any experience with this or be able to point me in the right direction!?
I'm using an library called ImageTouchView to have pinch zooming feature in my application. But whenever I use Canvas to draw a line on it, the drawn line does not zoom in/out, it just stays with the same size.
How am I be able to also zooming the drawn line?
I have solved it. To do it, I had to get the Canvas draw (with all lines I want) and convert it to an bitmap. Then I set this bitmap to the ImageView bitmap. Works like a charm!
I'm trying to do an app in Android that work with finger paint and that must be able to manage the zoom. So I have an image in the background and I draw over it, but when I zoom in and out, I have to resize both the image and the path drawn and I don't know how. I used the code of Zdnet to implement the pinch to zoom gesture and it works great for the background image, so I thought that the only step to make the "path resize" was to put mPath.transform(matrix) at the end of onTouch(), but it doesn't allow me to draw properly and does not resize the path.
How could I do it?
Note: the code to implement the finger paint is that of Google.
mPath.transform should work, it's hard to tell what's wrong without code.
Alternatively, you could use Canvas.scale if you want to scale everything drawn by the same factor.