Search Results

Search found 1267 results on 51 pages for 'rotate'.

Page 6/51 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • problem in rotate animation

    - by Talha
    Hi..I'm having some problem in rotating image view, I'm using rotate animation to rotate my image view,it works fine the image rotates well,but problem is that after animation completes the image sets back at original position.I want the image stops at position when rotation completes..Please help me I'm totally new to android I've tried so much but can't find solution to stop it.Thanks in advance I need Quick help

    Read the article

  • VB.NET custom user control graphics rotation

    - by AtharvaI
    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 to rotate. so far i've tried this: Dim gL As Graphics = Graphics.FromImage(bmpLongNeedle) gL.TranslateTransform(bmpLongNeedle.Width / 2, bmpLongNeedle.Height * 0.74) gL.RotateTransform(angleLongNeedle) gL.TranslateTransform(-bmpLongNeedle.Width / 2, -bmpLongNeedle.Height * 0.74) gL.DrawImage(bmpLongNeedle, 0, 0) As I understand it, the image of the needle should be rotated at angle "angleLongNeedle" although i'm placing the rotated image at 0,0. However, the result is that the Needle doesn't get drawn on the control. any pointers as to where I might be going wrong or something else I should be doing? Thanks in advance

    Read the article

  • How rotate TomCat 6 logs on Windows every night

    - by Danilo Brambilla
    Hi all, our TomCat 6 is running on a Windows Server 2003 server producing some logs on Program Files\Apache Software Foundation\Tomcat 6.0\logs folder. Only catalina.YYYY-MM-DD.log rotates every night. Admin. Host-Manager. Jakarta. LocalHost. Manager. stderr. stdout does not roate and are dated at the last server restart date. These files are most empty and always locked. How can I set TomCat to rotate all these logs every night (if possible without server/service restart)? Thank you in advance for help.

    Read the article

  • rotate an image aroound a point

    - by Girish
    Hi all, I have an image which is of rectangular dimension, eg 30 x 60 pixels I want to rotate this image around the bottom center of the image, i.e i want to set the pivot in the above example as (15, 60 )pixel. I am using a drawble and matrix to get this done, whatever i try i always end up rotating around center of the image. Code is : Bitmap bitmapOrg = BitmapFactory.decodeFile("/sdcard/DCIM/2010-06-01_15-32-42_821.jpg"); // float angle = (angle + 10.0f)%360.0f; if(null !=bitmapOrg) { int width = bitmapOrg.getWidth(); int height = bitmapOrg.getHeight(); int newWidth = 15; int newHeight = 15; // calculate the scale - in this case = 0.4f float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; /* Canvas c = new Canvas(bitmapOrg); float px = ; float py; c.rotate(angle, px, py)*/ // createa matrix for the manipulation Matrix matrix = new Matrix(); // resize the bit map matrix.postScale(scaleWidth, scaleHeight); // rotate the Bitmap // matrix.postRotate(45); // recreate the new Bitmap Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); // make a Drawable from Bitmap to allow to set the BitMap // to the ImageView, ImageButton or what ever BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); ImageView imageView = new ImageView(this); // set the Drawable on the ImageView imageView.setImageDrawable(bmd); // center the Image imageView.setScaleType(ScaleType.CENTER); // imageView.layout(100, 300, 0, 0); // linLayout.addView(imageView); // add ImageView to the Layout linLayout.addView(imageView, new AbsoluteLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 10, 30 ) ); can anyone let me know how to get this rectified?

    Read the article

  • UIView rotate and than move

    - by user1790354
    I have problem with rotating and moving image (UIView). If I use this for rotate: [UIView beginAnimations: @"rotate" contex: nil]; [UIView setAnimationDuration: 1]; [UIView setAnimationBeginsFromCurrentState: YES]; [UIView setAnimationCurve: UIViewAnimationCurveLinear]; spaceShip.transform = CGAffineTransformMakeRotation (angle); // spaceShip is the UIView [UIView commitAnimations]; And this to move: [UIView beginAnimations: @"move" contex: nil]; [UIView setAnimationDuration: 1]; [UIView setAnimationBeginsFromCurrentState: YES]; [UIView setAnimationCurve: UIViewAnimationCurveLinear]; spaceShip.center = destanation // destanation is a point where user tap [UIView commitAnimations]; It's working well one at a time. But together this two animations don't work. Space Ship is rotating, but does not move in direction. Where my mistake? P.S. Early I have specify anchor point (0.5, 0.5). But when I rotate image it coordinates is changing.

    Read the article

  • Rotating images with CSS and putting them back in place

    - by fuenfundachtzig
    When I rotate a large image with CSS -moz-transform: rotate(270deg); which sits in a floating div (using Firefox 3.6.3 to display the page), it messes up the page layout: Apparently, the size of the image is evaluated before it has been rotated. Furthermore, the image is displaced, partly being out of the screen, because the point it is rotated about is fixed. How can I improve this? (-moz-transform-origin doesn't help here.)

    Read the article

  • Screen rotation hot key (CTRL+ALT+UP) not responding, what's going on?

    - by Jamie
    The other day my son (11 months) discovered a new hot key combination on my laptop. As I'm sure many of you are aware (I wasn't until the other day), on machines with Intel Graphics, pressing CTRL+ALT+{any arrow key} rotates the screen. After I recovered from my shock, and did a little sideways Googling to figure out how to fix it, I decided this might actually be useful. I read a lot of online documentation, and it fits better on the screen when it's rotated. Since it's a laptop, I hold the machine like a book and read it. It worked great all afternoon yesterday. But today at work I tried to show a friend this new trick, using the same laptop, and found that the CTRL+ALT+UP no longer works. I can rotate it to any orientation but the normal one. I'm guessing something else is intercepting this hot key, but what could be doing this?

    Read the article

  • How do I rotate an image in Javascript or CSS

    - by Eric
    I am creating a simple game. I want to use jQUERY to rotate the joints making it move. I am using .animate ( http://api.jquery.com/animate/ ) to animate CSS properties but if it is also possible to use Javscript, I can make my own custom code. More TO-THE-POINT How do I rotate images in CSS or Javascript? I prefer CSS but Javascript is fine too. If it is impossible (which I am pretty sure it is but I am not giving up yet) is there any other possible way to do what i am trying to do without making a bunch of seperate images, each rotated a different way. Or can anyone at least give me an example of a site that does something similar. EDIT: I need 1 CSS property (no -something: rotation(500deg);) that works with FireFox, Safari and Chrome because those are the only browsers I really work with.

    Read the article

  • Drag Rotate UIImageView by touch

    - by rockstardev
    I have an UIImageView that is a subview of an UIView. I'm trying to create a drag rotate effect with the UIImageView similar to spinning a bottle but I'm having trouble calculating the radians to rotate the image by. My code below seems like it should work because I've seen a similar calculation in Flash examples. Can anyone shed some light on what I'm doing wrong? Thanks. This is the code contained in my image view subclass: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; lastLocation = [touch locationInView:[self superview]]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint location = [touch locationInView:[self superview]]; CGFloat xDisplacement = location.x - lastLocation.x; CGFloat yDisplacement = location.y - lastLocation.y; CGFloat rad = atan2f(yDisplacement,xDisplacement); self.transform = CGAffineTransformMakeRotation(rad); }

    Read the article

  • TTPhotoViewController thumbnails rotate but images don't

    - by Koray Balci
    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 when showing a picture it does not respond to rotation. Moreover, If I rotate in thumbnail view and then switch to single image view in that rotation, I find that the image is properly rotated in the background. It only ignores rotation when it is the topmost view! So, my understanding is that shouldRotate events are properly propagated, but for some reason single image view does not rotate when in top view, unlike the example code which is %98 equal to my code...

    Read the article

  • iPhone OS: Rotate just the button images, not the views

    - by Jongsma
    Hi, I am developing an iPad application which is basically a big drawing canvas with a couple of button at the side. (Doesn't sound very original, does it? :P) No matter how the user holds the device, the canvas should remain in place and should not be rotated. The simplest way to achieve this would be to support just one orientation. However, I would like the images on the buttons to rotate (like in the iPhone camera app) when the device is rotated. UIPopoverControllers should also use the users current orientation (and not appear sideways). What is the best way to achieve this? (I figured I could rotate the canvas back into place with an affineTransform, but I don't think it is ideal.) Thanks in advance!

    Read the article

  • Android Animate Rotate

    - by oriharel
    I did some digging in Android code, and saw the use of in the indeterminate progress bar. after trying to create my own drawable with this tag: <animated-rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@drawable/spinner_pia" android:pivotX="50%" android:pivotY="50%" android:framesCount="12" android:frameDuration="100" /> I get an error: "No resource identifier found for attribute 'frameDuration' in package 'android'" - which means that frameDuration is a private attribute. Is there a way to use this "animate-rotate" feature? My task is to replace the system's default indeterminate progress bar. I'd like to do it with as little code as possible (just change few attributes if possible). Using the ProgressBar view, setting: android:indeterminateOnly="true" android:indeterminateBehavior="cycle" android:indeterminateDuration="3500" android:indeterminateDrawable="@drawable/pia_sivuvator" and point "@drawable/pia_sivuvator" to that object would've make my task as elegant as they come but I'm stuck on those private attributes. help?

    Read the article

  • How to rotate an image properly in JPanel (Java)

    - by Bruce
    Hi guys, I'm working on rotating a loaded image. I set the graphics on a JPanel and then use standard AffineTransform in order to rotate it, say, 45 degrees. Unfortunately, the image is being cut, if it exceeds the panel area. How may I force JPanel to add scrolls to itself (while loading an image file, I would like to adjust the size of JPanel by adding the scrolls, without adjusting the size of JFrame). Or, in other words, how to correctly rotate the whole image? Thank you in advance for the reply!

    Read the article

  • Looking for a Toolbox (Crop/Position/Rotate) for a Website

    - by VIRTUALWEB
    I'm looking for a Toolbox for a Website that can do the following things: Write Text in a Text Editor (change its color/font size/font) and display it over an product image (plus drag&drop, do rotation). As Texteditor i could use TinyMCE but how to rotate/drag&drop? the same with images (upload a logo, display it over an existing product image) where the user could drag&drop it around or rotate it left/right in 90 degrees, and change its size. are there any tools outside that can handle that requirements? They could be AJAX, Flash, jQuery, JavaScript, ... tia

    Read the article

  • Creating a UIImage from a rotated UIImageView...

    - by Magic Bullet Dave
    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 there, by rotating the image context I get a rotated image: - (UIImage *) rotatedImageFromImageView: (UIImageView *) imageView { UIImage *rotatedImage; // Get image width, height of the bonuding rectangle CGRect boundingRect = [self getBoundingRectAfterRotation: imageView.bounds byAngle:angle]; // Create a graphics context the size of the boundinf rectangle UIGraphicsBeginImageContext(boundingRect.size); CGContextRef context = UIGraphicsGetCurrentContext(); // Rotate and translate the context CGAffineTransform ourTransform = CGAffineTransformIdentity; ourTransform = CGAffineTransformConcat(ourTransform, CGAffineTransformMakeRotation(angle)); CGContextConcatCTM(context, ourTransform); // Draw the image into the context CGContextDrawImage(context, CGRectMake(0, 0, imageView.image.size.width, imageView.image.size.height), imageView.image.CGImage); // Get an image from the context rotatedImage = [UIImage imageWithCGImage: CGBitmapContextCreateImage(context)]; // Clean up UIGraphicsEndImageContext(); return rotatedImage; } However the image is not rotated about its centre. I have tried all kinds of transforms concatenated with my rotate to get it to rotate around the centre but to no avail. Am I missing a trick? Is this even possible since I am rotating the context not the image? Getting desperate to make this work now, so any help would be appreciated. Dave

    Read the article

  • Resize view on iPhone when rotating

    - by BCBomb47
    I have an application with many views. I want only a couple of the views to be able to rotate to landscape when the device is rotated. I found out that I couldn't use (BOOL)shouldAutorotateToInterfaceOrientation because that would rotate every view in my app. I found a solution to this problem here on Stack Overflow but now I have another issue to deal with. The view rotates when I turn the device but it still shows the view as if it were still in portrait mode (straight up and down). The top and bottom of the view is cut off. Is there a way to have the view rotate and also adjust its size to fit the new orientation? I also found this but wasn't able to get it to work. Here's my code for that view: @implementation businessBank @synthesize webView, activityIndicator; - (void)viewDidLoad { [super viewDidLoad]; NSString *urlAddress = @"website_url"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [webView loadRequest:requestObj]; [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil]; } - (void)didRotate:(NSNotification *)notification { UIDeviceOrientation orientation = [[notification object] orientation]; if (orientation == UIDeviceOrientationLandscapeLeft) { [self.view setTransform:CGAffineTransformMakeRotation(M_PI / 2.0)]; } else if (orientation == UIDeviceOrientationLandscapeRight) { [self.view setTransform:CGAffineTransformMakeRotation(M_PI / -2.0)]; } else if (orientation == UIDeviceOrientationPortraitUpsideDown) { [self.view setTransform:CGAffine TransformMakeRotation(M_PI)]; } else if (orientation == UIDeviceOrientationPortrait) { [self.view setTransform:CGAffineTransformMakeRotation(0.0)]; } }

    Read the article

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

    - by Jules
    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, 0) (1) Disposals removed for brevity. (2) I test the code with a 200 x 200 rectangle. (3) Size 600,600 it just an arbitrary large value that I know will fit the right and bottom sides of the rotated image for testing purposes. (4) I know, with this code, the top and left edges will be clipped because I'm not transforming the orgin after the rotate. The problem only occurs at certain angles: (1) At 90, the right hand edge disappears completely. (2) At 180, the right and bottom edges are there, but very faded. (3) At 270, the bottom edge disappears completely. Is this a known bug? If I manually rotate the corners an draw the image by specifying an output rectangle, I don't get the same problem - though it is slightly slower than using RotateAt.

    Read the article

  • iPhone: In landscape-only, after first addSubview, UITableViewController doesn't rotate properly

    - by Clay Bridges
    A minimal illustrative Xcode project for this is available on github. On my UIWindow, when I add second (and subsequent) UITableView's as subviews, they do not rotate properly, and thus appear sideways. This is only tested in the Simulator. Here's a little code for you: - (void)applicationDidFinishLaunching:(UIApplication *)application { ShellTVC* viewA = [[ShellTVC alloc] initWithTitle:@"View A"]; ShellTVC* viewB = [[ShellTVC alloc] initWithTitle:@"View B"]; // The first subview added will rotate to landscape correctly. // Any subsequent subview added will not. // You may try this by various commentings and rearranging of these two statements. [window addSubview:[viewA tableView]]; [window addSubview:[viewB tableView]]; [window makeKeyAndVisible]; } viewB appears sideways. Comment out the addSubview for viewB, and viewA appears correctly. Do that for viewA only, and viewB appears correctly. I am not creating these UITableViewControllers via NIBs, though the UIWindow is. In case you are wondering, ShellTVC is-a UITableViewController, and implements this method: - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } Also, I have set the UIInterfaceOrientation in the plist file to UIInterfaceOrientationLandscapeLeft. Probably related -- and unanswered -- SO questions here and here.

    Read the article

  • Rotate a linked list

    - by user408041
    I want to rotate a linked list that contains a number. 123 should be rotated to 231. The function created 23 but the last character stays empty, why? typedef struct node node; struct node{ char digit; node* p; }; void rotate(node** head){ node* walk= (*head); node* prev= (*head); char temp= walk->digit; while(walk->p!=NULL){ walk->digit=walk->p->digit; walk= walk->p; } walk->digit=temp; } How I create the list: node* convert_to_list(int num){ node * curr, * head; int i=0,length=0; char *arr=NULL; head = NULL; length =(int) log10(((double) num))+1; arr =(char*) malloc((length)*sizeof(char)); //allocate memory sprintf (arr, "%d" ,num); //(num, buf, 10); for(i=length;i>=0;i--) { curr = (node *)malloc(sizeof(node)); (curr)->digit = arr[i]; (curr)->p = head; head = curr; } curr = head; return curr; }

    Read the article

  • SQLServer 2008 Pivot

    - by Mitch
    I need to show some information in a graph, the data is held in a SQL Server 2008 table. The graph is expecting 2 columns, one for QuestionNumber and the other for Score. The table containing the data has column names that correspond to the question numbers ie A1, A2, A3, A4, B1, B2, B3, B4, C1, C2. Each question is given a score of 1 to 5. I need to show a graph where the X axis shows A1, A2, A3 etc and the Y axis shows the score. I'm thinking I somehow need to rotate the data to achive this, but I'm not sure how. Maybe a different technique can acheive this rather that a Rotate, so I'm open to any ideas.

    Read the article

  • Rectangle Rotation in Python/Pygame

    - by mramazingguy
    Hey I'm trying to rotate a rectangle around its center and when I try to rotate the rectangle, it moves up and to the left at the same time. Does anyone have any ideas on how to fix this? def rotatePoint(self, angle, point, origin): sinT = sin(radians(angle)) cosT = cos(radians(angle)) return (origin[0] + (cosT * (point[0] - origin[0]) - sinT * (point[1] - origin[1])), origin[1] + (sinT * (point[0] - origin[0]) + cosT * (point[1] - origin[1]))) def rotateRect(self, degrees): center = (self.collideRect.centerx, self.collideRect.centery) self.collideRect.topleft = self.rotatePoint(degrees, self.collideRect.topleft, center) self.collideRect.topright = self.rotatePoint(degrees, self.collideRect.topright, center) self.collideRect.bottomleft = self.rotatePoint(degrees, self.collideRect.bottomleft, center) self.collideRect.bottomright = self.rotatePoint(degrees, self.collideRect.bottomright, center)

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >