Re: Offscreen work
Re: Offscreen work
- Subject: Re: Offscreen work
- From: Vince DeMarco <email@hidden>
- Date: Wed, 17 Oct 2001 08:56:18 -0700
On Wednesday, October 17, 2001, at 08:40 am, Dave MacLachlan wrote:
Thanks to everyone with their help passing NSImage via NSProxy...as it
turns
out I did have to create an NSData out of it and pass it along.
Next question....(sorry just learning this stuff again...it's been a while
since I played with a NeXT ;-)
How do I do offscreen work?
I've got an NSImage that I want to do some modifications to, and then get
an
NSImage back....
So far the best I can see is:
1) Create an NSWindow (hidden)
2) Get it's contentView
3) lockFocus the view
4) Composite my image
5) do some drawing using CoreGraphics
6) unlockFocus
7) make an NSData with dataWithEPSInsideRect
8) Create a NSImage with the NSData
Initialize a NSImage, lockfocus on the NSImage then draw then unlock focus
on the NSImage and do something with it.
vince