<?xml version="1.0" encoding="UTF-8"?>

<!--

 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab

 * Copyright (C) ENPC - Jean-Philippe Chancelier

 *


 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.

 *

 -->

<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="ja" xml:id="xstringb">

    <refnamediv>

        <refname>xstringb</refname>

        <refpurpose>文字列をボックス内に描画</refpurpose>

    </refnamediv>

    <refsynopsisdiv>

        <title>呼び出し手順</title>

        <synopsis>xstringb(x,y,str,w,h,[option])</synopsis>

    </refsynopsisdiv>

    <refsection>

        <title>引数</title>

        <variablelist>

            <varlistentry>

                <term>x,y,w,h</term>

                <listitem>

                    <para>ボックスを定義する実数スカラーのベクトル.</para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>str</term>

                <listitem>

                    <para>文字列の行列.</para>

                    <para>Scilab 5.2以降,<link linkend="math_rendering_features_in_graphic">

                            LaTeXまたはMathML式

                        </link>

                        を書くことができます.

                    </para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>option</term>

                <listitem>

                    <para>文字列.</para>

                </listitem>

            </varlistentry>

        </variablelist>

    </refsection>

    <refsection>

        <title>説明</title>

        <para>

            <literal>xstringb</literal>はユーザ座標で

            <literal>rect=[x,y,w,h]</literal>

            (左下の点, 幅, 高さ)の矩形の中の中心に

            文字列<literal>str</literal>の行列を描画します.

        </para>

        <para>

            <literal>option</literal>に<literal>"fill"</literal>が

            指定された場合,

            矩形の中をできるだけ埋めるように文字の大きさが計算されます.

        </para>

        <para>

            コマンド <literal>xstringb()</literal> を入力するとデモを参照できます.

        </para>

    </refsection>

    <refsection>

        <title>例</title>

        <programlisting role="example"><![CDATA[

str=["Scilab" "is";"$\sqrt{not}$" "elisaB"]; // LaTeXレンダリング (>= Scilab 5.2)

plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);



r=[0,0,1,0.5];

xstringb(r(1),r(2),str,r(3),r(4),"fill");

xrect(r(1),r(2)+r(4),r(3),r(4));



r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];

xrect(r(1),r(2)+r(4),r(3),r(4))

xstringb(r(1),r(2),str,r(3),r(4),"fill");



r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];

xrect(r(1),r(2)+r(4),r(3),r(4))

xstringb(r(1),r(2),str,r(3),r(4),"fill");

 ]]></programlisting>

        <scilab:image>

            str=["Scilab" "is";"$\sqrt{not}$" "elisaB"];

            plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);



            r=[0,0,1,0.5];

            xstringb(r(1),r(2),str,r(3),r(4),"fill");

            xrect(r(1),r(2)+r(4),r(3),r(4));



            r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];

            xrect(r(1),r(2)+r(4),r(3),r(4))

            xstringb(r(1),r(2),str,r(3),r(4),"fill");

        </scilab:image>

    </refsection>

    <refsection role="see also">

        <title>参照</title>

        <simplelist type="inline">

            <member>

                <link linkend="titlepage">titlepage</link>

            </member>

            <member>

                <link linkend="xstring">xstring</link>

            </member>

            <member>

                <link linkend="xstringl">xstringl</link>

            </member>

            <member>

                <link linkend="xtitle">xtitle</link>

            </member>

        </simplelist>

    </refsection>

</refentry>

