svn: /phpdoc/ru/trunk/reference/ image/functions/imagecolorallocatealpha.xml sqlite/functions/sqlite-libencoding.xml

[email protected] (Sergey Panteleev)
Newsgroups php.doc.ru
Message-ID <[email protected]>
sergey                                   Mon, 23 Dec 2019 02:36:58 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=348667

Log:
docs(ru): Updated to English revision

Changed paths:
    U   phpdoc/ru/trunk/reference/image/functions/imagecolorallocatealpha.xml
    U   phpdoc/ru/trunk/reference/sqlite/functions/sqlite-libencoding.xml

Modified: phpdoc/ru/trunk/reference/image/functions/imagecolorallocatealpha.xml
===================================================================
--- phpdoc/ru/trunk/reference/image/functions/imagecolorallocatealpha.xml	2019-12-22 18:32:18 UTC (rev 348666)
+++ phpdoc/ru/trunk/reference/image/functions/imagecolorallocatealpha.xml	2019-12-23 02:36:58 UTC (rev 348667)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 339875 Maintainer: tmn Status: ready -->
+<!-- EN-Revision: 348664 Maintainer: tmn Status: ready -->
 <!-- Reviewed: no -->
 <!-- $Revision$ -->
 <refentry xml:id="function.imagecolorallocatealpha" xmlns="http://docbook.org/ns/docbook">
@@ -95,10 +95,9 @@
  </refsect1>
  <refsect1 role="examples">
   &reftitle.examples;
-  <para>
-   <example>
-    <title>Пример использования <function>imagecolorallocatealpha</function></title>
-    <programlisting role="php">
+  <example>
+   <title>Пример использования <function>imagecolorallocatealpha</function></title>
+   <programlisting role="php">
 <![CDATA[
 <?php
 $size = 300;
@@ -136,18 +135,43 @@
 imagedestroy($image);
 ?>
 ]]>
-    </programlisting>
-    &example.outputs.similar;
-    <mediaobject>
-     <alt>Вывод примера: Пример использования imagecolorallocatealpha()</alt>
-     <imageobject>
-      <imagedata fileref="en/reference/image/figures/imagecolorallocatealpha.png"/>
-     </imageobject>
-    </mediaobject>
-   </example>
-  </para>
+   </programlisting>
+   &example.outputs.similar;
+   <mediaobject>
+    <alt>Вывод примера: Пример использования imagecolorallocatealpha()</alt>
+    <imageobject>
+     <imagedata fileref="en/reference/image/figures/imagecolorallocatealpha.png"/>
+    </imageobject>
+   </mediaobject>
+  </example>
+  <example xml:id="imagecolorallocatealpha.example.convert">
+   <title>Преобразование типичных альфа-значений для использования с <function>imagecolorallocatealpha</function></title>
+   <para>
+    Обычно альфа-значения <literal>0</literal> обозначают полностью прозрачные пиксели,
+    а альфа-канал имеет 8 битов. Чтобы преобразовать такие альфа-значения для совместимости
+    с <function>imagecolorallocatealpha</function>, достаточно немного простой
+    арифметики:
+   </para>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$alpha8 = 0; // полностью прозрачный
+var_dump(127 - ($alpha8 >> 1));
+$alpha8 = 255; // полностью непрозрачный
+var_dump(127 - ($alpha8 >> 1));
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+int(127)
+int(0)
+]]>
+ </screen>
+  </example>
  </refsect1>
-
+
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>

Modified: phpdoc/ru/trunk/reference/sqlite/functions/sqlite-libencoding.xml
===================================================================
--- phpdoc/ru/trunk/reference/sqlite/functions/sqlite-libencoding.xml	2019-12-22 18:32:18 UTC (rev 348666)
+++ phpdoc/ru/trunk/reference/sqlite/functions/sqlite-libencoding.xml	2019-12-23 02:36:58 UTC (rev 348667)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 297028 Maintainer: shein Status: ready -->
+<!-- EN-Revision: 348666 Maintainer: shein Status: ready -->
 <!-- Reviewed: yes Maintainer: sergey -->
 <!-- $Revision$ -->
 <refentry xml:id="function.sqlite-libencoding" xmlns="http://docbook.org/ns/docbook">
@@ -59,7 +59,7 @@
   &reftitle.seealso;
   <para>
    <simplelist>
-    <member><function>sqlite_lib_version</function></member>
+    <member><function>sqlite_libversion</function></member>
    </simplelist>
   </para>
  </refsect1>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.