<div dir="ltr"><br clear="all"><a href="http://ik.homelinux.org/">http://ik.homelinux.org/</a><br>
<br><br><div class="gmail_quote">On Sun, Feb 21, 2010 at 22:39, Valery Reznic <span dir="ltr"><<a href="mailto:valery_reznic@yahoo.com">valery_reznic@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
--- On Sun, 2/21/10, ik <<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>> wrote:<br>
<br>
> From: ik <<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>><br>
<div class="im">> Subject: Re: XWindows - how capture window ?<br>
</div>> To: "Valery Reznic" <<a href="mailto:valery_reznic@yahoo.com">valery_reznic@yahoo.com</a>><br>
> Cc: "linux-il." <<a href="mailto:linux-il@cs.huji.ac.il">linux-il@cs.huji.ac.il</a>><br>
> Date: Sunday, February 21, 2010, 10:25 PM<br>
<div class="im">> If you know the exact<br>
> position and dimension of the window, it's really easy<br>
> to capture it.<br>
</div>Yes, I know it window's geometry is 640x480+0+0<br>
<div class="im"><br>
><br>
> There are two ways to capture a window:<br>
> 1. access it's canvas<br>
> 2. capture a rectangle in the exact position of the<br>
> window<br>
><br>
><br>
><br>
> It takes about 5 minutes to write such progem when I use<br>
> Lazarus, you do not even need to create a visual application<br>
> for it.<br>
</div>There is a ready program to capture any windows - grabsc.<br>
The trouble is Xserver don't render window unless it appears on screen,<br>
and I don't want this window visible.<br></blockquote><div><br>So once again I don't understand here people. Sorry for that.<br>Anyway, if the DC does not have a draw message it will not draw, but if the view area is not displayed then it will not draw anyway (it save resources like that).<br>
<br>Why you do not wish to make the window display only for the screen capture and then remove it from view again ?<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="#888888"><br>
Valery<br>
</font><div><div></div><div class="h5">><br>
> Ido<br>
><br>
> On Sat, Feb 20, 2010 at 22:13,<br>
> Valery Reznic <<a href="mailto:valery_reznic@yahoo.com">valery_reznic@yahoo.com</a>><br>
> wrote:<br>
><br>
><br>
> Hi all.<br>
><br>
><br>
><br>
> I faced following problem:<br>
><br>
> I have X-Windows application. It has a lot of different<br>
> functions and buttons.<br>
><br>
><br>
><br>
> When one of those buttons is pressed applications open a<br>
> window<br>
><br>
> This window has a lot of different widgets inside (labels,<br>
> pixmaps, buttons, etc)<br>
><br>
><br>
><br>
> I need to capture this windows and save it content to the<br>
> file.<br>
><br>
> It's not that hard - xgrabsc program do all the work.<br>
><br>
><br>
><br>
> But what is hard (at least hard for me :) is to capture<br>
> content of this window, without it appearing on the screen.<br>
><br>
><br>
><br>
> I have source of this application, and can change it as I<br>
> like.<br>
><br>
> The trouble is unless windows actually appears on the<br>
> screen, xserver don't bother to draw it.<br>
><br>
><br>
><br>
> My screen is 640x480 I tried to create window with offset<br>
> 641 and 481 - i.e off screen. It doesn't work. I.e<br>
> window created and grabbed by xgrabsc, but it's content<br>
> is garbage.<br>
><br>
> When offse is 400and 400 then part of the window appears on<br>
> the screen and part not.<br>
><br>
> After grabbing this window I saw, that part that appears on<br>
> screen looks OK, but other part is garbage.<br>
><br>
><br>
><br>
> I also tried to use XComoposite extension - without any<br>
> success.<br>
><br>
><br>
><br>
> Application is very, very ancient. It was written withusing<br>
> Xlib functions and Xt toolkit - hardly more.<br>
><br>
><br>
><br>
> Also application uses XSHM extension, i.e solution<br>
> don't have be "network-aware" - anyway this<br>
> application doomed to work only locally by this extension.<br>
><br>
><br>
><br>
> I by no mean X expert, may be I missed something obvious<br>
> with XComposite<br>
><br>
> or just missed something<br>
><br>
><br>
><br>
> Do you have any ideas, how can I render this window off<br>
> screen and capture it's content ?<br>
><br>
><br>
><br>
> Valery.<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
><br>
> Linux-il mailing list<br>
><br>
> <a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
><br>
> <a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>