01-03-2011 04:01 AM
In my project I have to display images in a carousel view, some thing like the images should b displayed as an oscillation of a pendulum ( observe the picture below), using the touch screen or track pad moment, next image should be displayed. I gone through the link below and its really useful, Using that, I'm able to rotate the image using the image center, but I want to oscillate the image like a pendulum. For that I need to change the origin of the image. Can any one give guidance on how to change the origin of the image, so that I can achieve what I wanted.
send any sample code snippets or any articles, Any help in this regards would b highly appreciated....
01-04-2011 02:35 PM
I don't know why your image disappeared from your post.
You can do a two step process: rotate, translate. But you would have to figure out the translated position yourself.
Another option is more resource intensive but easier: Have a Bitmap that is the diameter of the "pendulum" and draw the image onto the bigger image. Rotate the bigger image and draw the bigger image on the screen.
There are probably other methods of doing it but those two are what I cam up with off the top of my head.