Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / WinPhoto.pm
CommitLineData
86530b38
AT
1package Tk::WinPhoto;
2require DynaLoader;
3
4use vars qw($VERSION);
5$VERSION = '3.008'; # $Id: //depot/Tk8/WinPhoto/WinPhoto.pm#8 $
6
7use Tk qw($XS_VERSION);
8require Tk::Image;
9require Tk::Photo;
10
11use base qw(DynaLoader);
12
13bootstrap Tk::WinPhoto;
14
151;
16
17__END__
18
19=head1 NAME
20
21Tk::WinPhoto - Load a Photo image from a window
22
23=for category Experimental Modules
24
25=head1 SYNOPSIS
26
27 use Tk;
28 use Tk::WinPhoto;
29
30 my $image = $mw->Photo(-format => 'Window', -data => oct($mw->id));
31 $image->write($path_name, -format => 'BMP|PPM|XPM');
32
33
34=head1 DESCRIPTION
35
36This is an extension for Tk800.* which will load a Photo image
37from a snapshot of an X window specified by the -data option.
38
39The window must exist and be visible. Because the code allows
40you to capture windows not owned by Tk it does not attempt to
41enforce this. If you are capturing one of Tk's windows then
42use C<$w-E<gt>update>.
43
44If window is mapped, but obscured by other windows then what is captured is the
45rectangle the window would occupy. This can be considered a feature.
46For Tk-owned windows C<$w-E<gt>raise> can used to bring window forward.
47
48Once the Photo is loaded it can be saved using
49C<$image-E<gt>write(-format =E<gt> ...)> using any of formats which support
50writing.
51
52=head1 AUTHOR
53
54Nick Ing-Simmons E<lt>nick@ni-s.u-net.comE<gt>
55
56=cut
57