Re: Tracking Rectangle Bounds
Re: Tracking Rectangle Bounds
- Subject: Re: Tracking Rectangle Bounds
- From: Richard Somers <email@hidden>
- Date: Wed, 18 Jul 2007 16:16:36 -0600
To make the tracking rectangle cover the entire bounds of the view
use the following adjustments. This seems to work.
NSRect rect = [self bounds];
rect.origin.y += -1.0;
rect.size.width += 1.0;
rect.size.height += 1.0;
trackingRectTag = [self addTrackingRect:rect
owner:self
userData:NULL
assumeInside:NO];
Richard
On Jul 18, 2007, at 10:02 AM, Richard Somers wrote:
In the Apple "Cocoa Event-Handling Guide" 2006-07-24 page 70 it
states "Tracking rectangle bounds are inclusive for the top and
left edges, but not for the bottom and right edges."
Indeed this is the case. I have a custom opengl view with a
tracking rectangle defined over the entire bounds or the visible
rectangle and the row of pixels on the bottom and right edges are
dead to tracking.
Why did Apple do this? The documentation gives no clue as to the
purpose of this behavior or how it may be circumvented.
In my application I do not want this behavior but it seems that I
have it regardless.
Regards, Richard
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden