<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) ENPC - Jean-Philippe Chancelier
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="xrects" xml:lang="pt">
    <refnamediv>
        <refname>xrects</refname>
        <refpurpose>desenha ou preenche um conjunto de retângulos</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Seqüência de Chamamento</title>
        <synopsis>xrects(rects,[fill])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Parâmetros</title>
        <variablelist>
            <varlistentry>
                <term>rects</term>
                <listitem>
                    <para>matrtiz de tamanho (4,n)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fill</term>
                <listitem>
                    <para>vetor de tamanho n.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Descrição</title>
        <para>
            <literal>xrects</literal> desenha ou preenche retângulos. Cada
            coluna de <literal>rects</literal> descreve um retângulo (ponto superior
            esquerdo, largura, altura): <literal>rects=[x1 x2... ; y1 y2... ; w1 w2... ; h1 h2...]</literal>.
        </para>
        <para>
            <literal>fill(i)</literal> fornece o padrão para preenchimento ou
            desenho do retângulo i:
        </para>
        <para>
            Se <literal>fill(i)&lt;0</literal>, o retângulo <literal>i</literal>
            é desenhado utilizando-se o estilo de linha (ou cor)
            <literal>-fill(i)</literal>
        </para>
        <para>
            Se <literal>fill(i)&gt;0</literal>, o retângulo <literal>i</literal>
            é preenchido utilizando-se o padrão (ou cor)
            <literal>fill(i)</literal>
        </para>
        <para>
            Se <literal>fill(i)=0</literal>, o retângulo <literal>i</literal> é
            desenhado utilizando-se o estilo de linha corrente (ou cor).
        </para>
        <para>AVISO: por favor, note que a altura é positiva indo para
            baixo.
        </para>
    </refsection>
    <refsection>
        <title>Exemplos</title>
        <programlisting role="example"><![CDATA[
plot2d([-100,500],[-50,50],[-1,-1],"022")
cols=[-34,-33,-32,-20:5:20,32,33,34];
x=400*(0:14)/14; step=20;
rects=[x;10*ones(x);step*ones(x);30*ones(x)];
xrects(rects,cols)
xnumb(x,15*ones(x),cols)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>Ver Também</title>
        <simplelist type="inline">
            <member>
                <link linkend="xfrect">xfrect</link>
            </member>
            <member>
                <link linkend="xrect">xrect</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
