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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11569: -setFrameOrigin: and -setFrameRotation:

Submitted by:  None
Submitted on:  Wed 12 Jan 2005 04:47:25 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

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

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

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
 Spam posted by an anonymous
Thu 19 May 2005 12:15:36 PM UTC, comment #2:

Corrected category

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Jul 2007 12:02:09 PM UTCFredKieferStatusNone=>Fixed
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>Closed
    Thu 19 May 2005 12:15:36 PM UTCFredKieferCategoryNone=>Gui/AppKit
      Item GroupNone=>Bug

    Back to the top


    Powered by Savane 3.1-cleanup1