I'm looking for a way to smoothly rotate an image object on screen.
(Note: NOT to straight away rotate by 90 degrees, but to give the option to fully rotate 360 degrees and be able to stop anywhere)
To get a better idea of what I'm saying, check out this app; YouTube - Funny Face - review iPhone Application - Customize Your Photo in a way you like. What I'm trying to do is basically the same thing as this app, but for tshirt designing, i.e. to take various small patterns, place them on a tshirt template while having the option to resize+rotate them.
I'm open to hear of anyway this can be done... looked around, but havent found any sample code relating to this..
I'm looking for a way to smoothly rotate an image object on screen.
(Note: NOT to straight away rotate by 90 degrees, but to give the option to fully rotate 360 degrees and be able to stop anywhere)
To get a better idea of what I'm saying, check out this app; YouTube - Funny Face - review iPhone Application - Customize Your Photo in a way you like. What I'm trying to do is basically the same thing as this app, but for tshirt designing, i.e. to take various small patterns, place them on a tshirt template while having the option to resize+rotate them.
I'm open to hear of anyway this can be done... looked around, but havent found any sample code relating to this..
Thanks!
You can rotate and scale how an image is displayed by applying an affine transform to it. This does not change the image itself, but how it is shown.
__________________
regards
Oliver Drobnik Cocoanetics - Our DNA is programmed in Objective-C.
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Thanks a lot Oliver!... that does indeed solve my problem to a certain degree.
But with the Affine Transform applied, I found that you cannot zoom in out of the rotated image (it results in some very weird transformations). I presume it is because as you said the Affine Transform changes how the image is displayed and not the image itself.
So, 2 questions here if I may;
1 - Is there any way to make the change by Affine transform permanent?
(change the image itself, not just how it is shown)