<?xml version="1.0" encoding="UTF-8"?>
<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="fr" xml:id="xstringl">
    <refnamediv>
        <refname>xstringl</refname>
        <refpurpose>calcule les dimensions d'une boîte
            entourant des chaînes de caractères
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Séquence d'appel</title>
        <synopsis>rect=xstringl(x,y,str,[fontId,fontSize])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Paramètres</title>
        <variablelist>
            <varlistentry>
                <term>rect</term>
                <listitem>
                    <para>vecteur de 4 scalaires définissant la boîte</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>x,y</term>
                <listitem>
                    <para>scalaires réels, coordonnées du point en bas à
                        gauche des chaînes de caractères.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>str</term>
                <listitem>
                    <para>matrice de chaînes de caractères.</para>
                    <para>
                        A partir de la version Scilab 5.2, il est possible d'utiliser les expressions <link linkend="math_rendering_features_in_graphic">LaTeX ou MathML</link>
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fonId</term>
                <listitem>
                    <para>
                        un entier specifiant le type de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link>
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fontSize</term>
                <listitem>
                    <para>
                        un entier specifiant la taille de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link>
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>xstringl</literal> renvoie dans <literal>rect=[x,y,w,h]</literal> (point
            en haut à gauche, largeur, hauteur) les dimensions d'un
            rectangle dans l'échelle graphique courante entourant les chaînes de
            caractères <literal>str</literal> dessinées à la position
            <literal>x,y</literal> (point en bas à gauche).
        </para>
        <para>Le résultat est approximatif avec le pilote PostScript.</para>
    </refsection>
    <refsection>
        <title>Exemples</title>
        <programlisting role="example">
            <![CDATA[
plot2d([0, 1], [0, 1], 0);
str = ["$\underleftrightarrow{Scilab}$" "n''est"; "pas" "elisaB"];
r = xstringl(0.5, 0.7, str);
xrects([r(1) r(2)+r(4) r(3) r(4)]');
xstring(r(1), r(2), str);

str = ["Scilab" "n''est "; "pas" "Matlab"];
r2 = xstringl(0.2, 0.2, str, 5, 7);
xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
xstring(r2(1), r2(2), str)
txt = gce();
txt.font_size = 7;
txt.font_style = 5;
 ]]>
        </programlisting>
        <scilab:image localized="true">
            <![CDATA[
plot2d([0, 1], [0, 1], 0);
str = ["$\underleftrightarrow{Scilab}$" "n''est"; "pas" "elisaB"];
r = xstringl(0.5, 0.7, str);
xrects([r(1) r(2)+r(4) r(3) r(4)]');
xstring(r(1), r(2), str);

str = ["Scilab" "n''est "; "pas" "Matlab"];
r2 = xstringl(0.2, 0.2, str, 5, 8);
xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
xstring(r2(1), r2(2), str)
txt = gce();
txt.font_size = 8;
txt.font_style = 5;
 ]]>
        </scilab:image>
        <programlisting role="example">
            <![CDATA[
plot2d([0, 1], [0, 1], 0);
mathml = "<mrow>" +..
            "<mfrac>" +..
                "<mrow>" +..
                    "<mi> d </mi>" +..
                    "<mi> y </mi>" +..
                "</mrow>" +..
                "<mrow>" +..
                    "<mi>d</mi>" +..
                    "<mi>x</mi>" +..
                "</mrow>" +..
            "</mfrac>" +..
                "<mo> = </mo>" +..
            "<mfrac>" +..
                "<mn> 1 </mn>" +..
                "<msup>" +..
                    "<mi> y </mi>" +..
                    "<mn> 2 </mn>" +..
                "</msup>" +..
            "</mfrac>" +..
         "</mrow>";
str=["SCILAB", "peut écrire du LaTeX :", "$\frac{abc}{xyz}$"; "ou", "du MathML :", mathml];
r2 = xstringl(0.2, 0.4, str, 10, 4);
xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
xstring(r2(1), r2(2), str);
txt = gce();
txt.font_size = 4;
txt.font_style = 10;
 ]]>
        </programlisting>
        <scilab:image localized="true">
            <![CDATA[
plot2d([0, 1], [0, 1], 0);
mathml = "<mrow>" +..
            "<mfrac>" +..
                "<mrow>" +..
                    "<mi> d </mi>" +..
                    "<mi> y </mi>" +..
                "</mrow>" +..
                "<mrow>" +..
                    "<mi>d</mi>" +..
                    "<mi>x</mi>" +..
                "</mrow>" +..
            "</mfrac>" +..
                "<mo> = </mo>" +..
            "<mfrac>" +..
                "<mn> 1 </mn>" +..
                "<msup>" +..
                    "<mi> y </mi>" +..
                    "<mn> 2 </mn>" +..
                "</msup>" +..
            "</mfrac>" +..
         "</mrow>";
str=["SCILAB", "peut écrire du LaTeX :", "$\frac{abc}{xyz}$"; "ou", "du MathML :", mathml];
r2 = xstringl(0.2, 0.4, str, 10, 4);
xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
xstring(r2(1), r2(2), str);
txt = gce();
txt.font_size = 4;
txt.font_style = 10;
 ]]>
        </scilab:image>
        <programlisting>
            <![CDATA[
plot2d([0, 6],[0, 6], 0);
str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";
     "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$";
     "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
     "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
     "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
r = xstringl(0.5, 0.5, str, 5, 3);
xrects([r(1); r(2)+r(4); r(3); r(4)]);
xstring(r(1), r(2), str);
txt = gce();
txt.font_size = 3;
txt.font_style = 5;
txt.font_color = 2;

str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
       "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
       "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
       "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
       "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
r = xstringl(2, 0.5, str, 0, 3);
xrects([r(1); r(2)+r(4); r(3); r(4)]);
xstring(r(1), r(2), str);
txt = gce();
txt.font_size = 3;
txt.font_style = 0;
txt.font_color = 2;
]]>
        </programlisting>
        <scilab:image>
            <![CDATA[
plot2d([0, 6],[0, 6], 0);
str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";
     "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$";
     "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
     "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
     "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
r = xstringl(0.5, 0.5, str, 5, 3);
xrects([r(1); r(2)+r(4); r(3); r(4)]);
xstring(r(1), r(2), str);
txt = gce();
txt.font_size = 3;
txt.font_style = 5;
txt.font_color = 2;

str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
       "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
       "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
       "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
       "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
r = xstringl(2, 0.5, str, 0, 3);
xrects([r(1); r(2)+r(4); r(3); r(4)]);
xstring(r(1), r(2), str);
txt = gce();
txt.font_size = 3;
txt.font_style = 0;
txt.font_color = 2;
]]>
        </scilab:image>
    </refsection>
    <refsection role="see also">
        <title>Voir aussi</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>
            <member>
                <link linkend="stringbox">stringbox</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
