1
0
mirror of https://github.com/php/doc-ja.git synced 2026-04-24 16:38:16 +02:00
Files
archived-doc-ja/reference/image/functions/imagealphablending.xml
T

116 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="function.imagealphablending" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagealphablending</refname>
<refpurpose>イメージのブレンドモードを設定する</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> によりTrueColorイメージに
二つの異なる描画モードを使用可能となります。ブレンドモードでは、
全ての描画関数に指定される色のalphaチャネル要素として使用され、
例えば<function>imagesetpixel</function>では背景色の透過割合を定
義します。結果として、gd は描画色に関してその点に存在する色を自動
的にブレンドし、イメージに結果を保存します。結果のピクセルは、透
明になります。ブレンドモードでない場合、描画色は形式的にそのアル
ファチャネル情報にコピーされ、出力ピクセルを置換します。ブレンド
モードは、パレットイメージを描画している際には使用できません。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&gd.image.description;
<varlistentry>
<term><parameter>enable</parameter></term>
<listitem>
<para>
ブレンドモードを有効にするかどうか。True Color 画像の場合のデフォルトは
&true;、それ以外の場合のデフォルトは &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><function>imagealphablending</function> の使用例</title>
<programlisting role="php">
<![CDATA[
<?php
// 画像を作成します
$im = imagecreatetruecolor(100, 100);
// アルファブレンディングをオンにします
imagealphablending($im, true);
// 正方形を描画します
imagefilledrectangle($im, 30, 30, 70, 70, imagecolorallocate($im, 255, 0, 0));
// 出力します
header('Content-Type: image/png');
imagepng($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
-->