Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: NSBezierPath from NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath from NSImage



On Dec 27, 2006, at 3:01 PM, Alan Smith wrote:

I have need of a way to make a NSBezierPath from the outline of a
NSImage. For example: Lets say I have an image with a circle in the
center. The corners will be transparent because
 well
 a circle isn't
quite square. I want to then create a NSBezierPath from that image, it
will end up as a circle path.

This can be done because Apple does it with all of its UI widgets.

I think you've made an assumption that's not well-founded. You seem to think the system is capable of drawing an appropriate focus indicator around an arbitrary control, but it'd seem much saner to me that cells know how to draw their own focus indicator and do so when told.


In fact, the NSView documentation for setFocusRingType: says: "This method only sets the desired focus ring type and does not cause the view to draw the actual focus ring. You are responsible for drawing the focus ring in your view’s drawRect: method whenever your view is made the first responder."

G


_______________________________________________

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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.