• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBezierPath from NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: "Data Kit" and Latent Semantic Analysis (subject added)
  • Next by Date: Accessing files in QT Cache
  • Previous by thread: Re: NSBezierPath from NSImage
  • Next by thread: Re: NSBezierPath from NSImage
  • Index(es):
    • Date
    • Thread