1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-28 09:02:14 +01:00
Files
archived-doc-ja/reference/image/functions/imagedashedline.xml
2025-08-17 09:10:31 +09:00

189 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.imagedashedline" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagedashedline</refname>
<refpurpose>破線を描画する</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>imagedashedline</methodname>
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
<methodparam><type>int</type><parameter>x1</parameter></methodparam>
<methodparam><type>int</type><parameter>y1</parameter></methodparam>
<methodparam><type>int</type><parameter>x2</parameter></methodparam>
<methodparam><type>int</type><parameter>y2</parameter></methodparam>
<methodparam><type>int</type><parameter>color</parameter></methodparam>
</methodsynopsis>
<para>
これは古い関数です。代わりに <function>imagesetstyle</function>
<function>imageline</function> の組み合せを使用してください。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&gd.image.description;
<varlistentry>
<term><parameter>x1</parameter></term>
<listitem>
<para>
左上の x 座標。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>y1</parameter></term>
<listitem>
<para>
左上の y 座標 0。0 は画像の左上の角です。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>x2</parameter></term>
<listitem>
<para>
右下の x 座標。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>y2</parameter></term>
<listitem>
<para>
右下の y 座標。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>color</parameter></term>
<listitem>
<para>
塗りつぶし色。&gd.identifier.color;
</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><function>imagedashedline</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
// 100x100 の画像を作成します
$im = imagecreatetruecolor(100, 100);
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
// 縦の破線を描画します
imagedashedline($im, 50, 25, 50, 75, $white);
// 画像を保存します
imagepng($im, './dashedline.png');
?>
]]>
</programlisting>
&example.outputs.similar;
<mediaobject>
<alt>出力例 : imagedashedline()</alt>
<imageobject>
<imagedata fileref="en/reference/image/figures/imagedashedline.png"/>
</imageobject>
</mediaobject>
</example>
<example>
<title><function>imagedashedline</function> のもうひとつの使用法</title>
<programlisting role="php">
<![CDATA[
<?php
// 100x100 の画像を作成します
$im = imagecreatetruecolor(100, 100);
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
// 独自のスタイルの作成: 最初の 4 ピクセルを白色、
// 次の 4 ピクセルを透明とし、破線風の効果を作成します
$style = Array(
$white,
$white,
$white,
$white,
IMG_COLOR_TRANSPARENT,
IMG_COLOR_TRANSPARENT,
IMG_COLOR_TRANSPARENT,
IMG_COLOR_TRANSPARENT
);
imagesetstyle($im, $style);
// 破線を描画します
imageline($im, 50, 25, 50, 75, IMG_COLOR_STYLED);
// 画像を保存します
imagepng($im, './imageline.png');
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>imagesetstyle</function></member>
<member><function>imageline</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
-->