The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Android application, camera movement and zooming
Naith


Joined: 03 Jul 2014
Posts: 158
Hello!

I have some problems which I hope someone will be able to help me with. I am developing a android application and this is the things I need help with:

1. When the application starts, I am loading and rendering a image on the screen. I want to be able to move around on the image when one finger is held onto it and then moved in a direction. The image is bigger than the screen itself and I therefore want to be able to move around on the image.

2. I also want to be able to zoom in on the image when two fingers are held onto the image and the fingers is then moved away from each other. I also want the zooming to occur at the position where the fingers are.
In short, I want to have a zoom function that works the same as when an image is viewed and zoomed in the gallery on a smart phone.

I really hope there's a way I can make this work and I hope someone will be able to help me with it, since I don't have a clue on how it can be made. The only thing I know at the moment is that I need some sorts of 2D camera that can be moved around.

Thanks in advance.
Naith


Joined: 03 Jul 2014
Posts: 158
I forgot to say that I'm using the SDL Renderer for rendering, so no OpenGL is used (at the moment).
Naith


Joined: 03 Jul 2014
Posts: 158
Anyone has any tips?