rotation

Can GDI+ EncoderParameter rotation only be applied to original image?

I'm performing rotation while resizing a JPEG image using GDI+. If I use Image.RotateFlip(RotateFlipType) when saving a JPEG, it works great. When I pass in any of the Encoder.Transformation parameters, I get a "Parameter is not valid." ArgumentException. I've read that using the Encoder.Transformation parameters during the save proces...

Navigation controller autorotation

Hi! I'm trying to find the answer and cannot believe that this problem is not widely and clearly explained. It's a quick question. Navigation based application, two view controllers, I want to autorotate my interface to landscape/portrait whenever used rotate his device. Autorotation works when 1st view controller is displayed. 2nd vi...

Second view in IB

I'm writing a game, in which I will be swapping out views. I have a loading screen which comes out in LandscapeRight mode, which is what I want. Then I want all subsequent views to load in Landscape. What ends up happening is that they load in Portrait (even though in IB I have them edited as Landscape views and the size dimensions ar...

OpenGL Rotations around World Origin when they should be around Local Origin

I'm implementing a simple camera system in OpenGL. I set up gluPerspective under the projection matrix and then use gluLookAt on the ModelView matrix. After this I have my main render loop which checks for keyboard events and, if any of the arrow keys are pressed, modifies angular and forward speeds (I only rotate through the y axis and ...

present a different controller when the iPhone is rotated

Hi, I would like to display a different controller when the iPhone is rotated. But only on it is on a certain controller. This is very similar to what the Bloomberg app does when you are looking at a stock. Turn the device and a 3 month's chart shows up. If there are some examples of this posted, that would be great to look at. If...

How does the Maps app on the iPhone 3Gs rotate as you turn the phone?

On an iPhone 3Gs, if you click the little "show my location" symbol on the lower left of the window twice, it switches to a mode that causes the map to rotate so that north on the map faces towards north according to the compass. I don't have a 3Gs, so I just found out about this from a buddy who does have one. I tried applying a rotati...

UIView rotation, modal view lanscape and portrait, parent fails to render

Hi everyone, I've hit a bit of a roadblock with something that I hope that someone in here can help me out with. I'll describe the 'state of play' first, and then what the issue is, so here goes; I have a series of view controllers that are chained together with a Navigation Controller (this works just fine), All of these view control...

Single-Stage vs Two-Stage Animation for iPhone Apps?

What are single-state and two-stage animation for rotating an iPhone window? This is the "error" message I get in the Debugger Console (nothing crashes): Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations. I was working through the book "Beginn...

3D Animation Rotating and Translating simultaneously in WPF

Hi, I have ModelVisual3D of a cube. I want to translate and rotate it at the same time. I wish the center of rotation to be in the middle of the cube(the cube rotates around its own axis). But when I try to do this applying both transformations the effect is not what you would expect. Since the object is translating the center of rotati...

iphone sdk CGAffineTransform getting the angle of rotation of an object

how do i calculate the angle of rotation for any given object (ie a uiimageview)? ...

Calculating the center of rotation after translation

I need to be able to rotate an image around a given point so that what ever part of the image appears in the center of my container is the center of rotation. To calculate the center points, I am currently just taking the inverse of the translation applied to the image: Rotate.CenterX = Translate.X * -1; Rotate.CenterY = Translate.Y * ...

Rotating a full 360 degrees in WPF 3D

Hi, I have a ModelVisual3D of a cube and I want to animate it to rotate around its axis for 360 degrees. I make a RoationTransform3D which I tell to rotate 360 but it doesn't rotate at all, also if you say 270 degrees it rotates only 90 degrees but in the opposite direction. I guess he computer calculates the "shortest path" of the rota...

How do you find a tight-fitting, axis-aligned, bounding box of a rotated ellipse in AS3?

The AS3 getBounds function returns a rectangle that is not fitting tightly to a rotated ellipse. Instead it returns an axis-aligned rectangle based on the bounds of a rectangle whose width/height corresponds to the max/min diameter of the ellipse and follows its rotation. The answer to a similar question on Stack Overflow elegantly outl...

Rotate a quad around a centre point in OpenGL

Hello, I'm making a 2D game. I want to be able to render a texture on the screen after rotating it a certain amount around a centre point. Basically this is for a level rotation around a player. The player position being the rotation point and the direction of the player as the angle. This code wont work: def draw_texture(texture,offset...

Detect the iPhone rotation spin?

Hello all, I want to create an application could detect the number of spin when user rotates the iPhone device. Currently, I am using the Compass API to get the angle and try many ways to detect spin. Below is the list of solutions that I've tried: 1/ Create 2 angle traps (piece on the full round) on the full round to detect whether the...

ViewController has wrong orientation after Landscape-only has been popped

In a navigation-based app, LandscapeViewController only supports landscape mode (all others support both modes). I also have a "loading screen" that advises the user to rotate the phone before continuing. This way I can make sure that when my landscape view loads, that it's in landscape mode. The problem comes when i rotate the phone to...

iPhone Rotation ... won't rotate .. plz help

My view hierarchy looks like this: tab bar -> navigation bar -> table view -> view 1 -> view 2 (UIWebView) How can I rotate view 2 so it can be displayed in both landscape & portrait mode? ...

How to setup Quaternion to move point to particular location?

Hello i've been working on this seemingly simple issue for more than 2 days. I would love it if you would help me out. I have some code to produce a list of vectors (19) (thisPose ArrayList) corresponding to a pose for a skeleton: private ArrayList updatePose ( int poseIndex , ArrayList listOfUpdates ) { int i; ...

Rotation causes keyboard to become nonresponsive

I have a UIViewController embedding a UITextField. When the user starts editing the text field, the view of the view controller is descreased in size so that the keyboard won't cover up the textfield: - (void)keyboardWillShow:(NSNotification *)note { // Find the height of the keyboard CGRect keyboardRect; [[note.userInfo valueForKey:UIK...

iphone sdk subview/superview orientation problem

Hi guys i have a iphone sdk orientation issue... i push a "holding" view controller onto the navigationController. The holdingViewController uses viewDidLoad to show the navigationController navbar and add a flip button to it and a selector for the flipbutton. it then adds a subview using UIViewAnimationTransitionNone showing a UIView ...