1
0
mirror of https://github.com/php/doc-ja.git synced 2026-04-28 18:43:16 +02:00
Files
archived-doc-ja/reference/image/functions/imagefilledarc.xml
T
2021-05-25 00:12:09 +09:00

214 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="function.imagefilledarc" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagefilledarc</refname>
<refpurpose>楕円弧を描画し、塗りつぶす</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>imagefilledarc</methodname>
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
<methodparam><type>int</type><parameter>center_x</parameter></methodparam>
<methodparam><type>int</type><parameter>center_y</parameter></methodparam>
<methodparam><type>int</type><parameter>width</parameter></methodparam>
<methodparam><type>int</type><parameter>height</parameter></methodparam>
<methodparam><type>int</type><parameter>start_angle</parameter></methodparam>
<methodparam><type>int</type><parameter>end_angle</parameter></methodparam>
<methodparam><type>int</type><parameter>color</parameter></methodparam>
<methodparam><type>int</type><parameter>style</parameter></methodparam>
</methodsynopsis>
<para>
指定した <parameter>image</parameter> の指定した座標を中心とする、
楕円弧を描画します。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&gd.image.description;
<varlistentry>
<term><parameter>center_x</parameter></term>
<listitem>
<para>
中心の x 座標。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>center_y</parameter></term>
<listitem>
<para>
中心の y 座標。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>width</parameter></term>
<listitem>
<para>
弧の幅。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>height</parameter></term>
<listitem>
<para>
弧の高さ。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>start_angle</parameter></term>
<listitem>
<para>
弧の開始角度。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>end_angle</parameter></term>
<listitem>
<para>
弧の終了角度。
0° は三時の方向で、そこから時計回りに数えます。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>color</parameter></term>
<listitem>
<para>
&gd.identifier.color;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>style</parameter></term>
<listitem>
<para>
次の選択肢のビット和。
<orderedlist>
<listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem>
<listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem>
<listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem>
<listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem>
</orderedlist>
<constant>IMG_ARC_PIE</constant> および
<constant>IMG_ARC_CHORD</constant> は相反します。
<constant>IMG_ARC_CHORD</constant> は、
開始角と終了角を直線で結ぶだけですが、<constant>IMG_ARC_PIE</constant>
は、角を丸めます。<constant>IMG_ARC_NOFILL</constant>
は、弧と弦が縁どられ塗りつぶされないことを指定します。
<constant>IMG_ARC_EDGED</constant> は、
<constant>IMG_ARC_NOFILL</constant> と共に指定することにより、
開始角と終端角は中心と結ばれます。これは、(塗りつぶすよりも)
「パイの切れ端」を縁どる良い方法です。
</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;
<para>
<example>
<title>3D 風のパイを作成する</title>
<programlisting role="php">
<![CDATA[
<?php
// 画像を作成します
$image = imagecreatetruecolor(100, 100);
// 色を割り当てます
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90);
$navy = imagecolorallocate($image, 0x00, 0x00, 0x80);
$darknavy = imagecolorallocate($image, 0x00, 0x00, 0x50);
$red = imagecolorallocate($image, 0xFF, 0x00, 0x00);
$darkred = imagecolorallocate($image, 0x90, 0x00, 0x00);
// 3D 効果を作成します
for ($i = 60; $i > 50; $i--) {
imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE);
}
imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE);
// 画像を出力します
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
]]>
</programlisting>
&example.outputs.similar;
<mediaobject>
<alt>出力例 : 3D 風のパイを作成する</alt>
<imageobject>
<imagedata fileref="en/reference/image/figures/imagefilledarc.png"/>
</imageobject>
</mediaobject>
</example>
</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:"~/.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
-->