1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) ENPC - Jean-Philippe Chancelier
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
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">
15 <refname>xrects</refname>
16 <refpurpose>draw or fill a set of rectangles</refpurpose>
19 <title>Calling Sequence</title>
20 <synopsis>xrects(rects,[fill])</synopsis>
23 <title>Arguments</title>
28 <para>matrix of size (4,n).</para>
34 <para>vector of size n.</para>
40 <title>Description</title>
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>.
48 <literal>fill(i)</literal> gives the pattern to use for filling or drawing rectangle i:
51 if <literal>fill(i)<0</literal>, rectangle <literal>i</literal> is drawn using the line style (or
52 color) <literal>-fill(i)</literal>
55 if <literal>fill(i)>0</literal>, rectangle <literal>i</literal> is filled using the pattern (or
56 color) <literal>fill(i)</literal>
59 if <literal>fill(i)=0</literal>, rectangle <literal>i</literal> is drawn using the current
60 line style (or color).
62 <para>WARNING: please note that height is positive downwards.</para>
65 <title>Examples</title>
66 <programlisting role="example"><![CDATA[
67 plot2d([-100,500],[-50,50],[-1,-1],"022")
68 cols=[-34,-33,-32,-20:5:20,32,33,34];
69 x=400*(0:14)/14; step=20;
70 rects=[x;10*ones(x);step*ones(x);30*ones(x)];
72 xnumb(x,15*ones(x),cols)
75 plot2d([-100,500],[-50,50],[-1,-1],"022")
76 cols=[-34,-33,-32,-20:5:20,32,33,34];
77 x=400*(0:14)/14; step=20;
78 rects=[x;10*ones(x);step*ones(x);30*ones(x)];
80 xnumb(x,15*ones(x),cols)
84 <refsection role="see also">
85 <title>See Also</title>
86 <simplelist type="inline">
88 <link linkend="xfrect">xfrect</link>
91 <link linkend="xrect">xrect</link>