bugGNUstep - Bugs: bug #11557, -hitTest: should check frame...

 
 

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

bug #11557: -hitTest: should check frame rotation.

Submitted by:  None
Submitted on:  Mon 10 Jan 2005 07:01:54 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sat 19 Jan 2008 11:44:11 PM UTC, comment #7:

Closed as there was no further feedback for half a year after my last update.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 10 Jul 2007 12:12:01 PM UTC, comment #6:

I think this was corrected on the 2006-10-19 by Greg with a patch from Banlu Kemiyatorn.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 28 Feb 2005 07:15:40 PM UTC, comment #5:

> Note that the line from -hitTest: that you quoted tests whether the point is inside the super view, not the view itself.


But it checks against the view's _frame, not _super_view's bounds.
So you should check only when the view isn't rotated. (the top
view shouldn't be rotated anyway)

the _frame is the origin of the view in _super_view (and size)
but not the view's actualy layout. Just create a simple button and
rotate it by 90 degree. You won't be able to click on it face
since it will never know that the view is completely fall off _frame.

Anonymous
Mon 28 Feb 2005 04:34:43 PM UTC, comment #4:

Note that the line from -hitTest: that you quoted tests whether the point is inside the super view, not the view itself. Further. the very next line is:

> p = [self convertPoint: aPoint fromView: _super_view];


so the point should be converted ok. Do you have a test case where this breaks?

Alexander Malmberg <alexm>
Project Member
Mon 28 Feb 2005 08:20:36 AM UTC, comment #3:

It should be transformed first because if the frame is rotated
and you didn't check the hit point against the matrix, you will
never know if the point is in the rotated view or not.

_____________
_/\__________
_/_\_________
/_Y_\________
\___/________
_\_/_X_______
_\/__________
_____________

If the view (given a button) is rotated, we should transform X to Y or
the hitTest: will return incorrect result (out of frame). For a bit more
efficient, just check if the view is rotated or not so we don't need
to transfrom the point when not neccessary.

Anonymous
Sat 12 Feb 2005 12:27:53 AM UTC, comment #2:

Could you please explain why you think the test with the transformed bounds would be better than one with the frame?
I must admit that there are quite a few things that I don't understand with the frame/bounds transformation and for this reason I would not dare to touch.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 10 Jan 2005 07:58:37 PM UTC, comment #1:

-removeFromSuperview may want to check too..

[_super_view setNeedsDisplayInRect: _frame];

the frame should be a converted rect from self bounds to superview..

Anonymous
Mon 10 Jan 2005 07:01:54 PM UTC, original submission:

if (_super_view && ![_super_view mouse: aPoint inRect: _frame])
return nil;

may be aPoint should be convertPoint:fromView:_super_view
and checked against bounds before returning nil.

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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 19 Jan 2008 11:44:11 PM UTCFredKieferOpen/ClosedIn Test=>Closed
    Tue 10 Jul 2007 12:12:01 PM UTCFredKieferStatusNone=>Fixed
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1