rotation

OpenCV rotation solution?

I am using those codes for rotation transforming an image, but it doesn't work. Waht is the problem? IplImage *src = cvLoadImage("image.jpg",1), *dst = cvCloneImage(src); CvMat *rotation_mat = cvCreateMat(2,3,CV_32FC1); CvPoint2D32f center = cvPoint2D32f(src->width/2 ,src->height/2); cvZero(dst); double angle = -50.0, s...

jQuery image crossfader problem

Hey!, I have a image switcher fadein/out (it will crossfade iamges - auto(1 - x) ) and a pager but i cant manage to make the image rotation listen the click action on pager, when clicked on pager the image will NOT jup tu the specific img. The problem is in the rotate function the triggerID will hold the "rel" num of the current pager-...

iPhone screen rotates at random !

I use a tabBar Controller as root controller. It has 4 tabs and each of its ViewControllers has - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return YES; } as long as the tabBarController itself. But when I rotate the device (real or simulator), the screen turns at random! If i...

actionscript3: reflect-class applied on rotationY

Hi, I'm using a class which applies a visual reflection-effect to defined movieclips. I use a reflection-class from here: link to source. It works like a charm except when I apply a rotation to the movieclip. In my case the reflection is still visible but only a part of it. What am I doing wrong? How could I pass/include the rotation to ...

how to apply the center of image view for another image view center

hi, I am developing image redraw app. i know the center of one image view which is having scaling property. i.e it can change it frame and center . that to be applied to another view center. when i apply center to newly formed Image view it giving wrong center because of the previous image view is having scaling property. so how can i ge...

iPhone - Prohobit UIView from rotating when the device is turned

I haven't been able to figure this out. Could someone please help me? I am trying to stop one UIView in my app from rotating when the device is turned. I am working on a drawing app. Right now, when the device is turned, all UI elements turn with it. What I am trying to do is have all the buttons, menus, etc. turn, but have my canvas U...

TTPhotoViewController thumbnails rotate but images don't

I have PhotoTest1Controller very similiar to the one in Three20 samples. I implemented necessary shouldRotate methods in necessary places in UITabBarController and UINavController derived classes as well as the table that contains PhotoTest1Controller. A funny thing is happening, when in thumbnail mode, the view rotates properly, but wh...

How to scale rotated objects properly in Actionscript 3?

This is unfortunately a quite complex issue to explain, so please don't get discouraged by the wall of text - it's there for a reason. ;) I'm working on a transformation manager for flash, written with Actionscript 3. Users can place objects on the screen, for example a rectangle. This rectangle can then be selected and transformed: mo...

Custom UIViewController is not responsive to device rotation

I have a custom UIViewController, which is the only subView of UIView. The UIViewController contains delegate function: (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } This function is called once when the application starts and is never called again when the device is rotated...

get rotation direction of UIView on touchesMoved

this may sound funny, but i spent hours trying to recreate a knob with a realistic rotation using UIView and some trig. I achieved the goal, but now i can not figure out how to know if the knob is rotating left or right. The most pertinent part of the math is here: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { ...

Rotate a custom UITableViewCell

I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is relative to the cell width. I set autoresizingMask=UIViewAutoresizingFlexibleWidth so it will adjust the cell width and the button positions properly when the application starts with the device either in landscape or portrait mode. The iss...

Rotate label control in vb.net form

I have a Label control on the form with small text. i want to be displayed - rotated counter clockwise by 90 degree VB.NET / Visual Studio 2005 Windows Forms Application Any ideas ...

Calculating rotation in > 360 deg. situations

I'm trying to work out a problem I'm having with degrees. I have data that is a list of of angles, in standard degree notation -- e.g. 26 deg. Usually when dealing with angles, if an angle exceeds 360 deg then the angle continues around and effectively "resets" -- i.e. the angle "starts again", e.g. 357 deg, 358 deg, 359 deg, 0 deg, 1 ...

UIImageView rotation (NOT the image, but the view)

Hi. How do I rotate the ImageView ... i'm trying to use landscape mode, and have a problem with accelerometer moving the image ... Because when I work in portrait mode the x of accelerometer is the same as the x of the image ... But when I work landscape, the x of accelerometer is the y of the image, because the ImageView autorotates wi...

IPHONE - Flip animation when controller pushed

Hi, I had a look around and didn't find what I was exactly looking for ... Is there a way to get a flip animation when pushing a view controller ? I read that you can change the animation by using a modal view controller but AFAIK the animation for a modal view is from bottom to top and that's not what i am looking for ;) Is there a ...

Rotating an Image in Silverlight without cropping

I am currently working on a simple Silverlight app that will allow people to upload an image, crop, resize and rotate it and then load it via a webservice to a CMS. Cropping and resizing is done, however rotation is causing some problems. The image gets cropped and is off centre after the rotation. WriteableBitmap wb = new WriteableBit...

Android CheckBox -- Restoring State After Screen Rotation

I have come across some very unexpected (and incredibly frustrating) functionality while trying to restore the state of a list of CheckBoxes after a screen rotation. I figured I first would try to give a textual explanation without the code, in case someone is able to determine a solution without all the gory details. If anyone needs m...

Changing X & Y of Button upon Rotation

Edited Mar 30 - Note: Monotouch used. When I rotate to LandscapeRight/Left I want to change the location of some of my buttons. Here's what I'm trying: Have my ShouldAutorotateToInterfaceOrientation returning True. In my WillRotate (I tried putting this in DidRotate as well) it doesn't show any difference, here's my code: public ...

iPhone UI layout debugging

I have this chronic issue with iPhone UI development where views sometimes seem to appear on the screen in a location different than what is reported by their frame property. Here is what I am doing to try to debug the issue: UIView *currentView = self.view; while (currentView!=nil) { NSLog(@"frame: %f,%f,%f,%f", currentView.frame.o...

Rotating pictures

Hello! I am currently programming a Tower Defence game for university and i stumbled upon a problem: i want my towers to rotate towards the monster it is shooting at. The towers are bitmaps and we are supposed to program in a language called Modula 2: If you have heard of it any help is welcome to rotate bitmaps, if you havent it might ...