Bug 8231 fixed: xrect doc did not say that clipping property was inherited
[scilab.git] / scilab / modules / graphics / help / en_US / geometric_shapes / xrects.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="xrects">
14     <refnamediv>
15         <refname>xrects</refname>
16         <refpurpose>draw or fill a set of rectangles</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>xrects(rects,[fill])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>rects</term>
27                 <listitem>
28                     <para>matrix of size (4,n).</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>fill</term>
33                 <listitem>
34                     <para>vector of size n.</para>
35                 </listitem>
36             </varlistentry>
37         </variablelist>
38     </refsection>
39     <refsection>
40         <title>Description</title>
41         <para>
42             <literal>xrects</literal> draws or fills a set of rectangles. 
43             Each column of <literal>rects</literal> describes 
44             a rectangle (upper-left point, width, height) in user coordinates:
45             <literal>rects=[x1 y1 w1 h1;x2 y2 w2 h2;...]'</literal>.
46         </para>
47         <para>
48             <literal>fill(i)</literal> gives the pattern to use for filling or drawing rectangle i:
49         </para>
50         <para>
51             if <literal>fill(i)&lt;0</literal>, rectangle <literal>i</literal> is drawn using the line style (or
52             color) <literal>-fill(i)</literal>
53         </para>
54         <para>
55             if <literal>fill(i)&gt;0</literal>, rectangle <literal>i</literal> is filled using the pattern (or
56             color) <literal>fill(i)</literal>
57         </para>
58         <para>
59             if <literal>fill(i)=0</literal>, rectangle <literal>i</literal> is drawn using the current
60             line style (or color).
61         </para>
62         <warning>Please note that height is positive downwards.</warning>
63         <warning>Created rectangles inherits the clip property from the current axes.</warning>
64     </refsection>
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example"><![CDATA[ 
68 plot2d([-100,500],[-50,50],[-1,-1],"022")
69 cols=[-34,-33,-32,-20:5:20,32,33,34];
70 x=400*(0:14)/14; step=20;
71 rects=[x;10*ones(x);step*ones(x);30*ones(x)];
72 xrects(rects,cols)
73 xnumb(x,15*ones(x),cols)
74  ]]></programlisting>
75         <scilab:image>
76             plot2d([-100,500],[-50,50],[-1,-1],"022")
77             cols=[-34,-33,-32,-20:5:20,32,33,34];
78             x=400*(0:14)/14; step=20;
79             rects=[x;10*ones(x);step*ones(x);30*ones(x)];
80             xrects(rects,cols)
81             xnumb(x,15*ones(x),cols)
82         </scilab:image>
83         
84     </refsection>
85     <refsection role="see also">
86         <title>See Also</title>
87         <simplelist type="inline">
88             <member>
89                 <link linkend="xfrect">xfrect</link>
90             </member>
91             <member>
92                 <link linkend="xrect">xrect</link>
93             </member>
94         </simplelist>
95     </refsection>
96 </refentry>