Looking for how I may go about achieving the effect that System
Preferences uses to place multiple spotlights on its icons as you
type into its search field (this is Tiger and later).
I note that spotlight uses a fuzzier edge when more items are
highlighted and a fairly sharp edge when a single item is highlighted.
I'd say the easiest way to do this (in Tiger) would be to punch
white circles out of a gray background, apply a gaussian blur
(possibly adjusting the blur radius based on the number of items
highlighted) via CoreImage, and draw the result over your original
window with a "multiply" blend mode (via either CI or the CG blend
mode feature). With this blend a darker gray background will
produce a greater contrast between the original and the shaded
areas, whereas a lighter gray will produce less difference.
Thanks for all the suggestions on achieving this effect. I've gone
down the gaussian blur path which is producing fantastic results.
I created an overlay window with a content color of clear and an
alpha of 2/3.
The window contains a view which will render a filtered image. The
image starts with a solid black fill. I then "paint" clear shapes to
form the cutouts. Finally, a gaussian blur is applied.
The result is that the overlay window will darken areas of the
underlying window for portions of the image that is black. The
cutouts of course allow the full intensity of the underlying window's
content to shine through. The blurred edges allow for a spotlight-
type effect.
I'll experiment though with an overlay window alpha of 1.0 and the
blend mode as you describe above. I don't expect there to be a huge
difference though in performance. My application of this effect will
be for a tutorial that is user-driven. Thus, I don't need high
frames-per-second drawing.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden