Re: Moving a window offscreen

2009-03-07 Thread Kyle Sluder
On Sat, Mar 7, 2009 at 7:00 AM, Jean-Daniel Dupas wrote: > Just for the record, NSBitmapDataRef has a - CGImage method which returns a > CGImageRef. Only on Leopard, unfortunately. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Moving a window offscreen

2009-03-07 Thread Jean-Daniel Dupas
Le 7 mars 09 à 12:25, Jonathan Dann a écrit : On 7 Mar 2009, at 12:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 12:11, Jonathan Dann a écrit : On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 05:50, Michael Ash a écrit : On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann

Re: Moving a window offscreen

2009-03-07 Thread Jonathan Dann
On 7 Mar 2009, at 12:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 12:11, Jonathan Dann a écrit : On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 05:50, Michael Ash a écrit : On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: Hi All, In my application I want to crea

Re: Moving a window offscreen

2009-03-07 Thread Jean-Daniel Dupas
Le 7 mars 09 à 12:11, Jonathan Dann a écrit : On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 05:50, Michael Ash a écrit : On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: Hi All, In my application I want to create an image of a document window as a preview prior

Re: Moving a window offscreen

2009-03-07 Thread Jonathan Dann
On 7 Mar 2009, at 11:00, Kyle Sluder wrote: On Sat, Mar 7, 2009 at 4:20 AM, Jean-Daniel Dupas wrote: Has this technic some benefit over locking focus on the window content view and using - [NSBitmapImageRep initWithFocusedViewRect:] ? Which technique? The Quartz technique will get you t

Re: Moving a window offscreen

2009-03-07 Thread Jonathan Dann
On 7 Mar 2009, at 11:14, Paul Sanders wrote: Which technique? The Quartz technique will get you the full window, including the titlebar. The -dataWithPDFInsideRect: gets you PDF data instead of a bitmap. Neither of which is advantageous when you want a bitmap image of the contents of a

Re: Moving a window offscreen

2009-03-07 Thread Jonathan Dann
On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote: Le 7 mars 09 à 05:50, Michael Ash a écrit : On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: Hi All, In my application I want to create an image of a document window as a preview prior to displaying the window to the user. To obtain

Re: Moving a window offscreen

2009-03-07 Thread Jonathan Dann
On 7 Mar 2009, at 05:50, Michael Ash wrote: On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: Hi All, In my application I want to create an image of a document window as a preview prior to displaying the window to the user. To obtain the CGImage of a displayed window is simple enough u

Re: Moving a window offscreen

2009-03-07 Thread Paul Sanders
> Which technique? The Quartz technique will get you the full window, > including the titlebar. The -dataWithPDFInsideRect: gets you PDF data > instead of a bitmap. Neither of which is advantageous when you want a > bitmap image of the contents of a window. If you are using Core Animation, you

Re: Moving a window offscreen

2009-03-07 Thread Kyle Sluder
On Sat, Mar 7, 2009 at 4:20 AM, Jean-Daniel Dupas wrote: > Has this technic some benefit over locking focus on the window content view > and using  - [NSBitmapImageRep initWithFocusedViewRect:] ? Which technique? The Quartz technique will get you the full window, including the titlebar. The -da

Re: Moving a window offscreen

2009-03-07 Thread Jean-Daniel Dupas
Le 7 mars 09 à 05:50, Michael Ash a écrit : On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: Hi All, In my application I want to create an image of a document window as a preview prior to displaying the window to the user. To obtain the CGImage of a displayed window is simple enough u

Re: Moving a window offscreen

2009-03-06 Thread Michael Ash
On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: > Hi All, > > In my application I want to create an image of a document window as a > preview prior to displaying the window to the user. To obtain the CGImage of > a displayed window is simple enough using the CGWindow API as shown below: > > -

Moving a window offscreen

2009-03-06 Thread Jonathan Dann
Hi All, In my application I want to create an image of a document window as a preview prior to displaying the window to the user. To obtain the CGImage of a displayed window is simple enough using the CGWindow API as shown below: - (CGImageRef)CGImage; { return CGWindowListCreateImage(CG