* Bug #12463 fixed - Bad specification for rect=[x,y,w,h] argument in french help
[scilab.git] / scilab / modules / graphics / help / en_US / text / xstringb.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) ENPC - Jean-Philippe Chancelier
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <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="en" xml:id="xstringb">
14     <refnamediv>
15         <refname>xstringb</refname>
16         <refpurpose>draw strings into a box</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>xstringb(x,y,str,w,h,[option])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x,y,w,h</term>
27                 <listitem>
28                     <para>vector of 4 real scalars defining the box.</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>str</term>
33                 <listitem>
34                     <para>matrix of strings.</para>
35                     <para>
36                         Starting from Scilab 5.2, it is possible to write <link linkend="math_rendering_features_in_graphic">LaTeX or MathML expression</link>.
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>option</term>
42                 <listitem>
43                     <para>string.</para>
44                 </listitem>
45             </varlistentry>
46         </variablelist>
47     </refsection>
48     <refsection>
49         <title>Description</title>
50         <para>
51             <literal>xstringb</literal> draws the matrix of strings <literal>str</literal> centered inside 
52             the rectangle <literal>rect=[x,y,w,h]</literal>
53             (lower-left point, width, height) in user coordinates.
54         </para>
55         <para>
56             If <literal>option</literal> is given with the value <literal>"fill"</literal>, the character size is 
57             computed so as to fill as much as possible in the rectangle.
58         </para>
59         <para>
60             Enter the command <literal>xstringb()</literal> to see a demo.
61         </para>
62     </refsection>
63     <refsection>
64         <title>Examples</title>
65         <programlisting role="example"><![CDATA[
66 str=["Scilab" "is";"$\sqrt{not}$" "elisaB"];
67 plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);
68
69 r=[0,0,1,0.5];
70 xstringb(r(1),r(2),str,r(3),r(4),"fill");
71 xrect(r(1),r(2)+r(4),r(3),r(4));
72
73 r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];
74 xrect(r(1),r(2)+r(4),r(3),r(4))
75 xstringb(r(1),r(2),str,r(3),r(4),"fill");
76  ]]></programlisting>
77         <scilab:image>
78             str=["Scilab" "is";"$\sqrt{not}$" "elisaB"];
79             plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);
80             
81             r=[0,0,1,0.5];
82             xstringb(r(1),r(2),str,r(3),r(4),"fill");
83             xrect(r(1),r(2)+r(4),r(3),r(4));
84             
85             r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];
86             xrect(r(1),r(2)+r(4),r(3),r(4))
87             xstringb(r(1),r(2),str,r(3),r(4),"fill");
88         </scilab:image>
89     </refsection>
90     <refsection role="see also">
91         <title>See Also</title>
92         <simplelist type="inline">
93             <member>
94                 <link linkend="titlepage">titlepage</link>
95             </member>
96             <member>
97                 <link linkend="xstring">xstring</link>
98             </member>
99             <member>
100                 <link linkend="xstringl">xstringl</link>
101             </member>
102             <member>
103                 <link linkend="xtitle">xtitle</link>
104             </member>
105         </simplelist>
106     </refsection>
107 </refentry>