rotation

IPhone how to properly resize view when rotating device

Hello, I have been trying to resize my view inside a view Controller with no luck so far. Basically I have a button at the very bottom of my view and when the orientation changes from Portrait to Landscape the button is no longer visible, because its just too far down now. How can I resize this view so that when the orientation changes...

Lossless PDF rotation

Hi everyone! is there a way to rotate a PDF 90 degrees losslessly, with Python or using the command line? I'm looking for a REAL rotation, not just adding a "/ROTATE 90" inside the PDF, because afterwards I have to send the PDF via Hylafax and it looks like that it ignores those commands. I tried with ImageMagick's convert but the qual...

What is the best way to rotate a CGPoint on a grid?

I want to rotate a CGPoint on the screen depending on the angle and the rotation is anchored on another point. Was wondering what is the most efficient way of doing this? ...

iPhone UITableView + Rotation = Disappearing Tables ?

I'm trying to replicate Apple's "Edit Details" functionality, where a grouped UITableView is shown with 1 row, and the entire cell is one big UITextView. For an example, go to the Contacts app, edit a contact, and add a Note field. That's what I'm going for. The problem I'm having is when you rotate the phone. The first time you rotate ...

How to prevent the view controllers in a tab bar controller from rotating?

I have a tab bar controller managing 4 tabs. I have subclassed the tab bar controller so that the shouldAutorotateToInterfaceOrientation: method only allows a specific view controller in one of the tabs to rotate. Everything works almost fine: the controllers in the remaining tabs do not rotate. However, when the view controller which is...

Android 1.6 Camera rotation?

I posted this on the android dev forums, but wanted to reach out here. One of the activities in our app was taking a picture. The picture preview shows the correct way on screen in 1.5 & 1.6, but when it is saved, it saves the jpg 90 rotated. I can rotate it realtime when displaying, and I guess I could re-save it once saved. My issue...

Normalise orientation between 0 and 360

Hi, I'm working on a simple rotate routine which normalizes an objects rotation between 0 and 360 degrees. My C# code seems to be working but I'm not entirely happy with it. Can anyone improve on the code below making it a bit more robust? public void Rotate(int degrees) { this.orientation += degrees; if (this.orie...

Matrix Multiplication To Rotate An Image In C#

I need to write a program that uses matrix multiplication to rotate an image (a simple square), based on the center of the square, a certain amount of degree based on what I need. Any help on this would be greatly appreciated. I almost have no clue as to what I'm doing because I have not taken so much as a glance at Calculus. ...

Xib view file is not working in landscape mode

Hi, I have added new Xib view file in my project. I assigned to view controller and in the view controller I set: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); return YES; } But when the application runs i...

Getting device orientation before rotating or forcing it at launch. Any ideas?

Hello, I'm here again! I have a deadline soon and I have very annoying bug in front of me and no ideas, how to fix it. The problem is, that sometimes device doesn't know what it's orientation is before it has been rotated and so it messes up frames in conditional statements: if (orient == UIInterfaceOrientationPortrait || orient == 0)...

Rotation in PHP's regex

How can you match the following words by PHP, either by regex/globbing/...? Examples INNO, heppeh, isi, pekkep, dadad, mum My attempt would be to make a regex which has 3 parts: 1st match match [a-zA-Z]* [a-zA-Z]? rotation of the 1st match // Problem here! The part 3 is the problem, since I do not know...

rotating multidimension matrix.

Given a 4x4 matrix, what formula could i apply to each (x,y) cell to yield an (x,y) if the matrix was rotated 90 degrees to the right? I tried iterating over each cell but different cells gave different formulas. Given the following matrix of values. 0| | | | | 1| | | | | 2| | | | | 3| | | | | ------------- ...

3D globe rotation issues

Hi all, Im trying to get my 3D sphere to rotate when a user moves their mouse/finger over the sphere. I can get it to rotate no problems, but when I try to add inertia to the sphere using the Affine2DInertiaProcessor in the Surface SDK, I get jumping issues when I quickly flick the sphere, and I dont know why... Here is my initialisat...

How can I rotate an image in .NET and output it to the client as a PNG?

I have an .aspx file that outputs an image using the following methods: Server.MapPath("somefile.png") Response.ContentType = "image/png"; Response.WriteFile(fileURI); I have a function that rotates the image by 0-360 degrees and returns it as a bitmap. How can I take this in-memory bitmap and then write it out to the client as a ...

Rotating coordinates around an axis

I'm representing a shape as a set of coordinates in 3D, I'm trying to rotate the whole object around an axis (In this case the Z axis, but I'd like to rotate around all three once I get it working). I've written some code to do this using a rotation matrix: //Coord is a 3D vector of floats //pos is a coordinate //angles is a 3d vector...

iPhone: Draw rotated text?

I want to draw some text in a view, rotated 90°. I'm pretty new to iPhone development, and poking around the web reveals a number of different solutions. I've tried a few and usually end up with my text getting clipped. What's going on here? I am drawing in a fairly small space (a table view cell), but there has to be a "right" way to d...

In Place rotation C++ Practice

Hello, I have a working rotating function going for my "items" int array. The code below gets it done, except that im transferring values out unnecessarily. Im trying to acheive the "inplace" rotation. What I mean by that is where the ptrs would increment or decrement instead of grabbing values out of the array..By which I need to "up" ...

WPF 3d rotation animations

Hi Everyone, I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, I want to slightly rotate it so that it looks like a see-saw (rotating from a range of -13 to 13 degrees on the Y-Axis). At ...

Any free polygon library for the iPhone?

I need a library that can manage polygon modeling and basic transformation like rotating and translating. I'd rather not redevelop everything from scratch Thanks ...

UIImage Rotation Offset

I have the following code - (void)ComputeRotationWithRadians:(CGFloat)rad { CGFloat width = exportImage.size.width; CGFloat height = exportImage.size.height; UIGraphicsBeginImageContext(CGSizeMake(width, height)); CGContextRef ctxt = UIGraphicsGetCurrentContext(); CGContextScaleCTM(ctxt, 1.0, -1.0); CGContextTran...