Re: System Preferences "halo/spotlight" effect
Re: System Preferences "halo/spotlight" effect
- Subject: Re: System Preferences "halo/spotlight" effect
- From: "John C. Daub" <email@hidden>
- Date: Fri, 13 Feb 2009 13:55:44 -0600
- Thread-topic: System Preferences "halo/spotlight" effect
on 2/13/09 10:26 AM, Kyle Sluder at email@hidden wrote:
> On Fri, Feb 13, 2009 at 7:51 AM, John C. Daub <email@hidden> wrote:
>> I'm figuring in System Preferences it's using an overlay window, but since
>> my content scrolls I cannot use a window and must use an NSView. I did find
>> -[NSView addSubview:positioned:relativeTo:], which helped me position my
>> "halo view" atop my contents, and I have been fiddling around with various
>> things trying to accomplish the effect but I can't quite get there. I do see
>> within System Preferences.app/Contents/Resources/ a spotlight.tif and
>> spotlightdim.tif which provide the halo masking, and I experimenting with
>> rendering copies of those TIFF's via
>> -drawAtPoint:fromRect:operation:fraction: within my -[HaloView drawRect:]
>> and I could sorta get things to work with a fraction of 0.5. But that just
>> gives me the halo. I'm struggling to get the fill over the full content
>> area, that then doesn't affect the halo areas.
>
> 1) Why can't you use an overlay window? Just convert to window
> coordinates and clip appropriately when objects are out of view.
Is there some particular reason why I ought to use an overlay window and not
just an NSView added via -addSubview:positioned:relativeTo: NSWindowAbove
relative to my content view?
> 2) If you want to go the image route, I'd use a Quartz mask. Saves
> you from having to render the blur at runtime.
Adam R. Maxwell posted another reply and I took his approach.
Thanx for the reply.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/hsoi/blog/>
Too numb to cry, too tough to die. - BLS
_______________________________________________
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