Saving the contents of a window

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Jay
Reply | Threaded
Open this post in threaded view
|

Saving the contents of a window

Jay
Hi All,
I have a question on capturing the contents of a window and save as a .gif file. I have read one of the post in this site which talks about how to capture the contents of a window and save as a .gif file. But not sure whether if i have a window with scrolls , then how do I get the full content? I am not able to get that as I tried using Window currentWindow  and then completeContentsOfArea:

Any advise on this would be highly appreciated.

Regards
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Saving the contents of a window

Steven Kelly
[vwnc] Saving the contents of a window
Hi Jay,
 
See Printer>>example1. You can use "builder window displayBox:" to resize your window during printing to get the full contents displayed without scrollbars. You can get an idea of the scale to use by asking your main UI component for its bounds and its widget's preferredBounds.
 
You might also want to look at the Windows Goodies parcel for RequestingHostPrinter, to get a printer dialog on Windows. CompressionZLibWrite+PNGImageWriter from the public library will let you write PNGs instead of GIFs, which are limited to 256 colors.
 
Hope this helps,
Steve


From: [hidden email] on behalf of Jay
Sent: Sat 03/03/2012 07:00
To: [hidden email]
Subject: [vwnc] Saving the contents of a window

Hi All,
I have a question on capturing the contents of a window and save as a .gif
file. I have read one of the post in this site which talks about how to
capture the contents of a window and save as a .gif file. But not sure
whether if i have a window with scrolls , then how do I get the full
content? I am not able to get that as I tried using Window currentWindow
and then completeContentsOfArea:

Any advise on this would be highly appreciated.

Regards
Jay

--
View this message in context: http://forum.world.st/Saving-the-contents-of-a-window-tp4440678p4440678.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Saving the contents of a window

Jay
Thanks for the input Steve. I tried with scaling but not succeeded. I am using VW 5i.
The window that i have to capture/save as a gif file has lot of other graphical views and hence it always have a scroll up and scroll down. If i scroll to the right/down , i could still see those graphical displays in the Window. But while saving, it is saving only the window portion.