NSBezierPath from NSImage?
NSBezierPath from NSImage?
- Subject: NSBezierPath from NSImage?
- From: Andersen Studley <email@hidden>
- Date: Tue, 3 Feb 2004 19:07:59 -0800
List,
Methinks maybe I just don't know the correct terms to search the
archives with...
Is it possible to create an NSBezierPath that outlines an image?
Here is what I am trying to do :
Create an image of a playing card.
Currently, I'm drawing the card manually with NSBezierPaths (will
repost my unreplied to question on path currentPoint in hopes that it
got missed with all the list activity)
So, I'd like to create the image of a card by referencing the outline
in a file ala [[NSImage alloc] initWithContentsOfFile:someFile];
which works, but if I want to eat my cake, too, I'd be able to change
the border of the image. The problem is that it is not a regular
rectangle, but rather a trapezoid to provide a relevant perspective
from where it is on the table.
Ideally, I would load the image, and then find some function(s) that
would be able to follow the borders of the image and create a
bezierPath. If it helps, the image could be a solid color with alpha
surrounding it.
I'm not looking for code examples (though they would be welcome) but a
nudge in the direction I need to go.
Much obliged,
Andersen Studley
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.