Hi, 

I am trying to apply the Pinch Gesture Recognizer to UIImage while the same
time means the zoom in or zoom out the image that time I want to rotate it
with 90 deg with that zooming level but my problem is that , 
while applying rotate operation with zoom only rotate the image with its
original scale. 

             I want perform both Zoom and Rotate operations simultaneously.
for rotate image i use the buttons to rotate image for zoom i use
PinchGestureRecognizor 

 code for PinchGestureRecognizor 

        void ScaleImage (UIPinchGestureRecognizer gestureRecognizer) 
                { 
                        AdjustAnchorPointForGestureRecognizer
(gestureRecognizer); 
                        if (gestureRecognizer.State ==
UIGestureRecognizerState.Began || gestureRecognizer.State ==
UIGestureRecognizerState.Changed) {     
                                gestureRecognizer.View.Transform *=
CGAffineTransform.MakeScale (gestureRecognizer.Scale,
gestureRecognizer.Scale); 
                                // Reset the gesture recognizer's scale -
the next callback will get a delta from the current scale. 
                                gestureRecognizer.Scale = 1f;   
                                imageForReset = gestureRecognizer.View; 
                        } 
                } 


 For Button Rotate

        public float OnRotateClick (UIImageView imgview, float deg, string 
btnNames, out float _wdth, out float _hgt) 
                {       
                        _wdth = imgview.Frame.Width; 
                        _hgt = imgview.Frame.Height; 
                        SizeF _imgFrameSize = new SizeF (Width, Height); 
                        imgview.Frame.Size = _imgFrameSize; 
                        if (btnNames == "Rotate R") 
                        {       
                                
                                Angle = deg + 90; 
                                imgview.Transform =
CGAffineTransform.MakeRotation (Angle * (float)Math.PI / 180); 
                                return Angle; 
                                
                        }  else 
                        { 
                                Angle = deg - 90; 
                                imgview.Transform =
CGAffineTransform.MakeRotation (Angle * (float)Math.PI / 180); 
                                return Angle; 
                        } 
                } 

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/I-done-zooming-on-Gesture-Recognizer-While-same-I-want-to-perform-Rotate-Operation-with-UIButton-clit-tp4655881.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to