bugGNUstep - Bugs: bug #11569, -setFrameOrigin: and...

Group
 
 

bug #11569: -setFrameOrigin: and -setFrameRotation:

Submitter:  None
Submitted:  Wed 12 Jan 2005 04:47:25 AM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 10 Jul 2007 12:02:09 PM UTC, comment #4: 

The problem has been fixed through recent changes to the rotation implementation on NSView.

Fred Kiefer <FredKiefer>
Group Member
  Spam posted by anonymous
Thu 19 May 2005 12:15:36 PM UTC, comment #2: 

Corrected category

Fred Kiefer <FredKiefer>
Group Member
Thu 03 Mar 2005 03:58:45 AM UTC, comment #1: 

I think this is the misuse of _frameMatrix.
_frameMatrix should be created/used only when
the frame is rotated.  ie. setFrameOrigin:
shouldn't alter the _frameMatrix. The current
breakage is the behavior of this bug.

Anonymous
Wed 12 Jan 2005 04:47:25 AM UTC, original submission:  

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];
}


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-07-10 FredKiefer StatusNone Fixed
        Assigned toNone FredKiefer
        Open/ClosedOpen Closed
    2005-05-19 FredKiefer CategoryNone Gui/AppKit
        Item GroupNone Bug

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code