58d89f10ded881dfde6543d0946f512626dea84e
[scilab.git] / scilab / modules / graphics / help / en_US / geometric_shapes / xrect.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.1-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="xrect">
14     <refnamediv>
15         <refname>xrect</refname>
16         <refpurpose>draw a rectangle</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>xrect(x,y,w,h)
21             xrect(rect) // with rect =[x,y,w,h]
22         </synopsis>
23     </refsynopsisdiv>
24     <refsection>
25         <title>Arguments</title>
26         <variablelist>
27             <varlistentry>
28                 <term>x,y,w,h</term>
29                 <listitem>
30                     <para>four real values defining the rectangle.</para>
31                 </listitem>
32             </varlistentry>
33         </variablelist>
34     </refsection>
35     <refsection>
36         <title>Description</title>
37         <para>
38             <literal>xrect</literal> draws a rectangle defined by <literal>[x,y,w,h]</literal> 
39             (upper-left point, width, height) in user coordinates.
40         </para>
41         <para>WARNING: please note that height is positive downwards.</para>
42     </refsection>
43     <refsection>
44         <title>Examples</title>
45         <programlisting role="example"><![CDATA[ 
46 plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
47 xset("color",5)
48 xrect(-1,1,2,2)
49  ]]></programlisting>
50         <scilab:image>
51             plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
52             xset("color",5)
53             xrect(-1,1,2,2)
54         </scilab:image>
55         
56     </refsection>
57     <refsection role="see also">
58         <title>See Also</title>
59         <simplelist type="inline">
60             <member>
61                 <link linkend="xfrect">xfrect</link>
62             </member>
63             <member>
64                 <link linkend="xrects">xrects</link>
65             </member>
66         </simplelist>
67     </refsection>
68 </refentry>