bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #11569] -setFrameOrigin: and -setFrameRotation:


From: anonymous
Subject: [bugs #11569] -setFrameOrigin: and -setFrameRotation:
Date: Wed, 12 Jan 2005 04:47:26 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12

This is an automated notification sent by Savannah.
It relates to:
                bugs #11569, project GNUstep

==============================================================================
 OVERVIEW of bugs #11569:
==============================================================================

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11569>

                 Summary: -setFrameOrigin: and -setFrameRotation:
                 Project: GNUstep
            Submitted by: None
            Submitted on: Tue 01/11/2005 at 23:47
                Category: None
                Severity: 5 - Average
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________


If I want to setFrameOrigin: (or setFrame:) correctly

while keeping old rotation angle, I must keep the old

angle first, then set frame rotation to 0, then set origin

then set frame rotation to old angle.



This code will let the button rotate and move the frame.

But it doesn't work properly on GNUstep but Cocoa.

(you may want to keep calling it a few times to produce

the unexpected result)



- (void) buttonPush:(id)sender

{



                float oldAngle = [aView frameRotation];

                [aView setFrameRotation:oldAngle + 10];



                NSRect oldRect = [aView frame];

                [aView setFrame:NSOffsetRect(oldRect,10,10)];

        [[aView superview] setNeedsDisplay:YES];

}



a small workaround can fix it.



- (void) buttonPush:(id)sender

{



                float oldAngle = [aView frameRotation];

                [aView setFrameRotation:oldAngle + 10];



                NSRect oldRect = [aView frame];



                [aView setFrameRotation:0]; //hack1



                [aView setFrame:NSOffsetRect(oldRect,10,10)];



                [aView setFrameRotation:oldAngle + 10]; //hack2



        [[aView superview] setNeedsDisplay:YES];

}










==============================================================================

This item URL is:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11569>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]