home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_b87e4a2ff23a75bae8047616d303666d
< prev
next >
Wrap
Text File
|
2000-03-23
|
3KB
|
76 lines
<HTML>
<HEAD>
<TITLE>Tk::WinPhoto - Load a Photo image from a window</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Tk::WinPhoto - Load a Photo image from a window</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Tk::WinPhoto - Load a Photo image from a window</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
use Tk;
use Tk::WinPhoto;</PRE>
<PRE>
my $image = $mw->Photo(-format => 'Window', -data => oct($mw->id));
$image->write($path_name, -format => 'BMP|PPM|XPM');</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This is an extension for Tk800.* which will load a Photo image
from a snapshot of an X window specified by the -data option.</P>
<P>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 <CODE>$w->update</CODE>.</P>
<P>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 <CODE>$w->raise</CODE> can used to bring window forward.</P>
<P>Once the Photo is loaded it can be saved using
<A HREF="../../../lib/Pod/perlfunc.html#item_write"><CODE>$image->write(-format => ...)</CODE></A> using any of formats which support
writing.</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Nick Ing-Simmons <<A HREF="mailto:nick@ni-s.u-net.com">nick@ni-s.u-net.com</A>></P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Tk::WinPhoto - Load a Photo image from a window</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>