mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Initial imagegrabwindow() & imagegrabscreen docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236223 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fb554a8dba
commit
d6a98a40e2
3 changed files with 268 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- $Revision: 1.20 $ -->
|
||||
<appendix id="migration52">
|
||||
<title>Migrating from PHP 5.1.x to PHP 5.2.x</title>
|
||||
|
||||
|
@ -819,12 +819,28 @@ $obj->getCommentName('');
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para><link linkend="ref.image">Image</link>:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>imagegrabscreen</function>
|
||||
- Grabs a screenshot of the whole screen
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>imagegrabwindow</function>
|
||||
- Captures a window. As of PHP 5.2.2.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para><link linkend="ref.mbstring">mbstring</link>:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>mb_list_encodings_alias_names</function>
|
||||
- Returns an array of all supported entity encodings
|
||||
- Returns an array of all supported entity encodings. As of PHP 5.2.2.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
105
reference/image/functions/imagegrabscreen.xml
Normal file
105
reference/image/functions/imagegrabscreen.xml
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.imagegrabscreen">
|
||||
<refnamediv>
|
||||
<refname>imagegrabscreen</refname>
|
||||
<refpurpose>Captures the whole screen</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>imagegrabscreen</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Grabs a screenshot of the whole screen.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
This function takes no parameters.
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an image resource identifier on success, &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
This function issues no errors.
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imagegrabscreen</function> example</title>
|
||||
<para>
|
||||
This example demonstrates how to take a screenshot of the current screen
|
||||
and save it as a png image.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$im = imagegrabscreen();
|
||||
imagepng($im, "myscreenshot.png");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<para>
|
||||
This function is only available on Windows.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>imagegrabwindow</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
145
reference/image/functions/imagegrabwindow.xml
Normal file
145
reference/image/functions/imagegrabwindow.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.imagegrabwindow">
|
||||
<refnamediv>
|
||||
<refname>imagegrabwindow</refname>
|
||||
<refpurpose>Captures a window</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>imagegrabwindow</methodname>
|
||||
<methodparam><type>int</type><parameter>window</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>client_area</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Grabs a window or its client area using a windows handle (HWND property in COM instance)
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>window</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The HWND window ID
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>client_area</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include the client area of the application window
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an image resource identifier on success, &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
E_NOTICE is issued if <parameter>window_handle</parameter> is invalid
|
||||
window handle.
|
||||
E_WARNING is issued if the Windows API is too old.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imagegrabwindow</function> example</title>
|
||||
<para>
|
||||
Capture a window (IE for example)
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$browser = new COM("InternetExplorer.Application");
|
||||
$handle = $browser->HWND;
|
||||
$browser->Visible = true;
|
||||
$im = imagegrabwindow($handle);
|
||||
$browser->Quit();
|
||||
imagepng($im, "iesnap.png");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Capture a window (IE for example) but with its content
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$browser = new COM("InternetExplorer.Application");
|
||||
$handle = $browser->HWND;
|
||||
$browser->Visible = true;
|
||||
$browser->Navigate("http://www.libgd.org");
|
||||
|
||||
/* Still working? */
|
||||
while ($browser->Busy) {
|
||||
com_message_pump(4000);
|
||||
}
|
||||
$im = imagegrabwindow($handle, 0);
|
||||
$browser->Quit();
|
||||
imagepng($im, "iesnap.png");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<para>
|
||||
This function is only available on Windows.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>imagegrabscreen</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
Loading…
Reference in a new issue