Re: NSBezierPath from NSImage
Re: NSBezierPath from NSImage
- Subject: Re: NSBezierPath from NSImage
- From: Steve Streza <email@hidden>
- Date: Wed, 27 Dec 2006 13:51:25 -0500
If you're trying to make focus rings, one technique you could try is
to take the NSImage you have and, before drawing it, set an NSShadow
that has a center point of NSZeroPoint. For example:
NSImage *myImage;
if(isSelected){
NSShadow *focusRingShadow = [[[NSShadow alloc] init] autorelease];
[focusRingShadow setShadowColor:[NSColor keyboardFocusIndicatorColor]];
[focusRingShadow setShadowOffset:NSZeroPoint];
[focusRingShadow setShadowBlurRadius:0];
[focusRingShadow set];
}
[myImage compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver];
Hope that helps.
Steve Streza
TubularApp.com | SteveStreza.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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