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



Hi Alan,

What are you *really* trying to do?

Do you want a NSBezierPath because you're gonna use it for some calculation or additional drawing? Or are you really just looking to do some edge detection? (BTW, you can use Core Image to do the edge detection then composite the "edge-detected" image with the original to produce a-pale-imitation-of a "focus ring" on your image)

curiously,

douglas

On Dec 27, 2006, at 10:17 AM, Alan Smith wrote:

Hello all,

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.
They can all have a "focus ring" around them. Unless there is an image
for each widget that shows the ring. That would suck.

Also, it would be nice if the solution could work on something that
has already been drawn on-screen. If the solution could actually
produce a "focus ring" for any arbitrary UI widget on a window, within
a specific rect, that would be awesome.

So, if anyone has any ideas, source code, or suggestions, please let me know.

Peace, Alan

_______________________________________________

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


References: 
 >NSBezierPath from NSImage (From: "Alan Smith" <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.