Re: Masking Tracking Rects
Re: Masking Tracking Rects
- Subject: Re: Masking Tracking Rects
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 19 Sep 2007 22:44:28 -0700
On Sep 19, 2007, at 9:50 PM, Jason Barker wrote:
So I tried adding one tracking rectangle to the view and then another
one to the view with the same bounds. And when I mouse over that area
of the view, it seems as through a mouse entered event is fired for
each tracking rectangle. So adding a tracking rectangle that overlaps
another does not produce a masking effect.
Does anyone have a better idea?
Have you determined that the extra events are problematic? ....
cause a performance issue that is significant enough to warrant trying
to go beyond simply minimizing the area of the tracking rect(s) and
doing a bit of math to see if the mouse is really over something that
needs to be redrawn?
Unless you have an unbelievably complex boundary to track, the cost of
doing a bit of hit detection math is going to be orders of magnitude
less than the cost of actually drawing state changes as the mouse
moves. Doubly so if you are using anything like shadows, reflections,
or partial transparency.
b.bum
_______________________________________________
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