1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-26 00:32:15 +01:00
Files
archived-doc-ru/reference/image/functions/imagegrabwindow.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

174 lines
4.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 180ed02e4b694873316c707014e1aaf68ebf6a04 Maintainer: tmn Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.imagegrabwindow" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagegrabwindow</refname>
<refpurpose>Захватывает изображение окна</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagegrabwindow</methodname>
<methodparam><type>int</type><parameter>handle</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>client_area</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Делает снимок окна или его клиентской части, используя windows обработчик
(свойство HWND COM объекта)
</para>
<note>
<para>
Функция доступна только в Windows.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>handle</parameter></term>
<listitem>
<para>
ID окна HWND.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>client_area</parameter></term>
<listitem>
<para>
Включает клиентскую часть окна приложения.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает объект изображения в случае успешного выполнения, &false; в случае
возникновения ошибки.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
E_NOTICE выдаётся, если <parameter>handle</parameter> является
недопустимым обработчиком окна.
E_WARNING выдаётся, если Windows API устарел.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
В случае успешного выполнения функция теперь возвращает экземпляр <classname>GDImage</classname>;
ранее возвращался ресурс (<type>resource</type>).
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>client_area</parameter> теперь ожидает
логическое значение (<type>bool</type>);
ранее ожидалось целое число (<type>int</type>).
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>imagegrabwindow</function></title>
<para>
Захват окна (IE например)
</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");
imagedestroy($im);
?>
]]>
</programlisting>
<para>
Захват окна (IE например) с содержимым
</para>
<programlisting role="php">
<![CDATA[
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Navigate("http://www.libgd.org");
/* ещё работает? */
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "iesnap.png");
imagedestroy($im);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>imagegrabscreen</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->