Re: Masking Tracking Rects
Re: Masking Tracking Rects
- Subject: Re: Masking Tracking Rects
- From: "Jason Barker" <email@hidden>
- Date: Wed, 19 Sep 2007 22:50:47 -0600
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?
Thanks,
Jason
On 9/19/07, Jason Barker <email@hidden> wrote:
> I am trying to create a rollover effect within areas of these objects.
> I thought that by creating the tracking rectangles for each specific
> area would yield fewer events that I would have to handle and reduce
> the processing required by my application.
>
> If I create a tracking rectangle for the rearmost object and then
> create another tracking rectangle which corresponds to the area that
> the foremost object would mask, would the mouse entered event yield
> the tracking rectangle of the foremost object or the rearmost object?
>
> Is there a simpler way to approach this?
>
>
> Thanks,
> Jason
>
> On 9/19/07, I. Savant <email@hidden> wrote:
> > On Sep 19, 2007, at 2:10 AM, Jason Barker wrote:
> >
> > > As you can see, it's possible for an object on a foreground layer to
> > > mask one or two corners of an underlying object's tracking rectangle
> > > if not the entire tracking rectangle.
> > >
> > > In attempting to draw the tracking rectangles, what is the best way to
> > > do so, compensating for any objects that might mask tracking
> > > rectangles of underlying objects?
> > >
> >
> > What are you really trying to accomplish in general? Why not create
> > one big tracking rectangle for the visible region of your view and
> > determine what to do at the current coordinates (in the same way you
> > calculate what to do on mouse down if you're dragging your individual
> > elements around as in the Sketch example).
> >
> > --
> > I.S.
> >
> >
> >
>
_______________________________________________
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