Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Tk::WinPhoto

Name Tk::WinPhoto
Version 4.005
Located at /usr/lib64/perl5/vendor_perl
File /usr/lib64/perl5/vendor_perl/Tk/WinPhoto.pm
Is Core No
Search CPAN for this module Tk::WinPhoto
Documentation Tk::WinPhoto
Module Details Tk::WinPhoto

NAME

Tk::WinPhoto - Load a Photo image from a window


SYNOPSIS

  use Tk;
  use Tk::WinPhoto;
  my $image = $mw->Photo(-format => 'Window', -data => oct($mw->id));
  $image->write($path_name, -format => 'BMP|PPM|XPM');


DESCRIPTION

This is an extension for Tk800.* which will load a Photo image from a snapshot of an X window specified by the -data option.

The window must exist and be visible. Because the code allows you to capture windows not owned by Tk it does not attempt to enforce this. If you are capturing one of Tk's windows then use $w->update.

If window is mapped, but obscured by other windows then what is captured is the rectangle the window would occupy. This can be considered a feature. For Tk-owned windows $w->raise can used to bring window forward.

Once the Photo is loaded it can be saved using $image->write(-format => ...) using any of formats which support writing.


AUTHOR

Nick Ing-Simmons <nick@ni-s.u-net.com>

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024