rotate

HTML5 Canvas: How to make a loading spinner by rotating the image in degrees?

I am making a loading spinner with html5 canvas. I have my graphic on the canvas but when i rotate it the image rotates off the canvas. How do I tell it to spin the graphic on its center point? <!DOCTYPE html> <html> <head> <title>Canvas test</title> <script type="text/javascript"> window.onload = function() { var drawingCan...

How to stop rotation of ABPersonViewController & ABNewPersonViewController in Landscape mode in iphone

I am using a ABPersonViewController & ABNewPersonViewController class by pushview controller. ABPersonViewController *pvc = [[ABPersonViewController alloc] init]; [pvc setPersonViewDelegate:self]; [[self navigationController] pushViewController:pvc animated:YES]; In ABPersonViewController & ABNewPersonViewController page it is display...

iphone: reloading webview with rotation

i'm using uiwebview to display a very basic html page with just text. i want to support landscape and portrait orientations but i'm having a problem with resizing when the orientation changes. specifically, when the iphone is rotated to landscape, it zooms in on the text (i want the text size to remain the same and for it to fill the wid...

Rotating Cursor According to Rotated TextBox

Hi All I have a TextBox that I allow my users to rotate. But what I would LOVE for my users is to have their Cursor rotate to the same angle that the TextBox was rotated at. For example, if they rotated the TextBox to 28°, then when the Cursor enters that TextBox the Cursor should also rotate itself to 28°. Any help at all will be grea...

Creating a UIImage from a rotated UIImageView...

I have a UIImageView with an image in it. I have rotated the image prior to display by setting the transform property of the UIImageView to CGAffineTransformMakeRotation(angle) where angle is the angle in radians. I want to be able to create another UIImage that corresponds to the rotated version that I can see in my view. I am almost...

Rotate controls in Java

Hi, how to rotate same control in java? For example I want to rotate radiobutton for 90 or 180 degrees How to do this on on JAVA SDK for android developing? ...

Image rotate opecv error

When I use this code to rotate the image, the destination image size remains same and hence the image gets clipped. Please provide me a way/code snippet to resize accordingly (like matlab does in imrotate) so that image does not get clipped and outlier pixels gets filled with all white instead of black. I dont image to be scaled down to ...

Rotate an Android ImageView AND its background

Using this mechanism I'm able to successfully rotate the image in an ImageView. Works great. However, if the ImageView has a background image, that drawable is not also rotated. How can I also rotate the background image of an ImageView? ...

how to know the direction of rotation of UIImage in iPhone

hello, i want to rotate the uiimage in the direction turned, i'm able to get the angle between touchesBegan and TouchesEnd points but how should i decide whether to rotate cockwise or anti-clockwise? Plz help ...

Is there bug in the Matrix.RotateAt method for certain angles? .Net Winforms

Here's the code i'm using to rotate: Dim m As New System.Drawing.Drawing2D.Matrix Dim size = image.Size m.RotateAt(degreeAngle, New PointF(CSng(size.Width / 2), CSng(size.Height / 2))) Dim temp As New Bitmap(600, 600, Imaging.PixelFormat.Format32bppPArgb) Dim g As Graphics = Graphics.FromImage(temp) g.Transform = m g.DrawImage(image, 0,...

VB.NET custom user control graphics rotation

Hi, this is my first question on here. I'm trying to build a dial control as a custom user control in VB.NET. I'm using VS2008. so far I have managed to rotate image using graphics.rotatetransform . however, this rotate everything. Now I have a Bitmap for the dial which should stay stable and another Bitmap for the needle which I need...

How to find out the coordinates of rotated textframe

Hi All, With the help of (idml) itemtransform horizontal / vertical distances and path point arrays, I can find out the coordinates of text frame (x1,y1), (x2,y2), (x3,y3), (x4,y4). If the textframe is rotated then item transform values are getting changed, but the path point array values are same. I can find rotation angle by the matri...

Android rotate control

How to rotate control (checkbox) in 180 or 90 degrees ? ...

How to rotate a drawable with anti-aliasing enabled

I need to rotate an ImageView by a few degrees. I'm doing this by subclassing ImageView and overloading onDraw() @Override protected void onDraw(Canvas canvas) { canvas.save(); canvas.scale(0.92f,0.92f); canvas.translate(14, 0); canvas.rotate(1,0,0); super.onDraw(canvas); canvas.restore(); } The problem is tha...

Rotating app weird text skewing problem? Using shouldAutorotateToInterfaceOrientation

I am creating my first iPhone app which rotates when the user rotates the phone. I have a bit of a weird problem. I have a label with some text in it and when the screen rotates the text sort of deforms. Once in the new position it looks perfectly fine. Has anyone had this problem? I am just using the regular way of shouldAutorotateToInt...

Rotating Viewbox contents smoothly

I'm looking to teach myself better methods of doing things in WPF that I would normally do manually. In this case, I have a ViewBox with an image in it. I also have a button that uses a DoubleAnimation to rotate the image 90 to the right. This animation works fine, but obviously because it's square as it turns, the image does a "best f...

CONFUSING : CGAffineTransform - rotation on uibutton resizes buttonimage ?! (iPad)

hi there, i've got a strange problem using uibuttons, type custom. i'm placing 4 of those buttons on a scrollview, rotating each button by a random angle using CGAffineTransform. now it seems, that the buttons itself change size depending on the angle of rotation. can't get this problem solved :( UIGraphicsBeginImageContext(tempCtxSiz...

How can i use RotateAnimation to rotate a circle?

I want my circle image (ImageView) to rotate as the user touch and drag it. If the user drags it to the right, it should spin right and vice versa. Like when you spin a DJ disc, if you know what i mean. I've played around a bit with OnTouchListener and RotateAnimation but i'm getting nowhere. Any ideas? ...

How to rotate MXML component round its center like a wheel respectfully to mouse?

So I have that panel or any other mxml component. I want somehow to rotate it around like a wheel of a car with which you drive it... loke a Racing wheel... sow like when mousebutton is down it captures pont of component... when you move mouse component rotates (not moves) according to new mouse position... How to rotate MXML component r...

How to create a gesture controlled rotating image for a UI

I'm trying to figure out the best way to make an image rotate along with a user's finger dragging it left or right. I want to try and match the rate a user's finger is moving with the rate the image is rotating. I've got the basic setup for my application going, with the menus and whatnot I want to have, and that's all running great on...