mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
120 lines
3.2 KiB
XML
120 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry xml:id="function.imagealphablending" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagealphablending</refname>
|
|
<refpurpose>Modifie le mode de blending d'une image</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagealphablending</methodname>
|
|
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>bool</type><parameter>enable</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagealphablending</function> fournit deux modes de dessin
|
|
des images en vraies couleurs (truecolors). En mode "blending", le canal
|
|
alpha de chaque couleur est fourni à chaque fonction de dessin, tel que
|
|
<function>imagesetpixel</function> peut déterminer sa transparence. GD va alors
|
|
automatiquement mixer la couleur à ce point, et stocker le résultat dans
|
|
l'image. Le pixel résultant est alors opaque. En mode non-mixant, la
|
|
couleur est copiée littéralement avec ses informations de canal alpha,
|
|
et remplace le pixel de destination. Le mixage n'est pas disponible
|
|
avec les images à palette.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>enable</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Si l'on doit activer le mode blending ou non.
|
|
Sur les images à couleurs vraies, la valeur par défaut
|
|
est &true;, sinon, la valeur par défaut est &false;.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
&gd.changelog.image-param;
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemple avec <function>imagealphablending</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Création d'une image
|
|
$im = imagecreatetruecolor(100, 100);
|
|
|
|
// Définit l'alphablending à on
|
|
imagealphablending($im, true);
|
|
|
|
// Dessine un carré
|
|
imagefilledrectangle($im, 30, 30, 70, 70, imagecolorallocate($im, 255, 0, 0));
|
|
|
|
// Affichage
|
|
header('Content-Type: image/png');
|
|
|
|
imagepng($im);
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|