Fwd: How to convert an NSBezierPath to an NSImage?
Fwd: How to convert an NSBezierPath to an NSImage?
- Subject: Fwd: How to convert an NSBezierPath to an NSImage?
- From: Marco Binder <email@hidden>
- Date: Fri, 11 Apr 2003 17:35:56 +0200
Hi,
why do you want to make images out of your NSBezierPaths? To just draw
and move them in your view, you can plainly use the paths, cant you?!
However, if you want to render an NSBezierPath into an NSImage, simply
create a new image like [[NSImage alloc] initWithSize:[myBezPath
bounds].size], the you lock the graphic focud on the image: [myImage
lockFocus] and have your path drawn: [myBezPath fill] (or stroke, just
as you wish). Dont forget to unlock the focus again [myImage
unlockFocus] and ready you are!
Marco
Am Freitag, 11.04.03 um 17:08 Uhr schrieb Arthur VIGAN:
>
Hi,
>
>
I am working on a little animation that moves different NSImage
>
objects in a view. I have some other drawings made with NSBezierPath,
>
and I would like to make NSImage of them to display them in my view
>
with the other images. Is that possible?
>
>
Thanks in advance,
>
>
-- Arthur
>
_______________________________________________
>
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.
>
>
--
|\ /| email@hidden
http://www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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.