Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
Since the SonOfGrab application works for grabbing the contents of my window, even when it is partially offscreen at the time of taking the screen grab I had a look at what it was doing differently. Basically SonOfGrab was passing in CGRectNull into CGWindowListCreateImage instead of a defined

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
> This is NOT OK: > > - (void)handleIncomingDrawCommand:(id)drawCommand { > CGContextRef cgContext = [[NSGraphicsContext currentContext] > graphicsPort]; > ImmediatelyPerformDrawCommand(drawCommand, cgContext); // NO! > } Bugger, that is exactly what I'm doing. Basically the tool is intended

Re: Taking screen shots

2014-06-18 Thread Kyle Sluder
On Wed, Jun 18, 2014, at 09:01 AM, Kevin Meaney wrote: > Drawing happens when I receive an xpc message containing a drawing > command. To do the drawing I get the NSGraphicsContext from which I pull > the graphicsPort which is a special kind of CGContext. I then use > CoreGraphics commands to do th

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
SonOfGrab displays in the composited image window the correct image after following the same steps. Kevin On 18 Jun 2014, at 17:01, Kevin Meaney wrote: > On Jun 18, 2014, at 8:36 AM, Kevin Meaney wrote: >>> >>> The sequence of events are: >>> >>> 1. Drag window so that it is partially offsc

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
On Jun 18, 2014, at 8:36 AM, Kevin Meaney wrote: >> >> The sequence of events are: >> >> 1. Drag window so that it is partially offscreen. >> 2. Draw into the window where part of the drawing happens in the part of the >> window that is offscreen. > > Ok, what does this mean? In AppKit, you do

Re: Taking screen shots

2014-06-18 Thread Kyle Sluder
On Jun 18, 2014, at 8:36 AM, Kevin Meaney wrote: > > The sequence of events are: > > 1. Drag window so that it is partially offscreen. > 2. Draw into the window where part of the drawing happens in the part of the > window that is offscreen. Ok, what does this mean? In AppKit, you don’t draw i

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
The sequence of events are: 1. Drag window so that it is partially offscreen. 2. Draw into the window where part of the drawing happens in the part of the window that is offscreen. 3. Drag the window so that it is fully on screen. Observe that the window shows all the drawing that was performed.

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
Apologies, The e-mail with the code went out before I was finished editing. The code shown is that taking the screen capture. But what is captured is not what I see in the window. Kevin On 18 Jun 2014, at 16:24, Kevin Meaney wrote: >> Not really. >> >> Can you show some code? >> > >d

Re: Taking screen shots

2014-06-18 Thread Kyle Sluder
> On Jun 18, 2014, at 8:24 AM, Kevin Meaney wrote: > > [ snip ] Thanks. But I’m still confused about the timing. What method does this code live in, and when is that method executed relative to the window being dragged completely back on to the screen? --Kyle Sluder __

Re: Taking screen shots

2014-06-18 Thread Kevin Meaney
> Not really. > > Can you show some code? > dictArray = CGWindowListCopyWindowInfo(kCGWindowListOptionIncludingWindow, (CGWindowID)[self._window windowNumber]); if (dictArray && (CFArrayGetCount(dictArray) > 0)) windowDict = CFArrayGetValu

Re: Taking screen shots

2014-06-18 Thread Kyle Sluder
On Wed, Jun 18, 2014, at 07:12 AM, Kevin Meaney wrote: > If drawing to the window happens when the window is not completely on > screen and if you drag the window so that it is fully visible on screen > so you can see that all the drawing you did is actually drawn and then > take a snapshot using C

Taking screen shots

2014-06-18 Thread Kevin Meaney
Actually just window shots. I feel like I've been fighting with the screen shot code, and that it shouldn't be this difficult. I get past one problem only to find another. My most recent seems intractable. If drawing to the window happens when the window is not completely on screen and if you