• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Offscreen work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • RE: Offscreen work
      • From: "Dave MacLachlan" <email@hidden>
References: 
 >Offscreen work (From: "Dave MacLachlan" <email@hidden>)

  • Prev by Date: Re: Security Issue ... was[What happens to ...]
  • Next by Date: C Structs as objects?
  • Previous by thread: Offscreen work
  • Next by thread: RE: Offscreen work
  • Index(es):
    • Date
    • Thread