<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - Djalel Abdemouche
 *
 * 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: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="glue">
    <refnamediv>
        <refname>glue</refname>
        <refpurpose>
            glue a set of graphics entities into an Compound.
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>glue(H)
            h_agreg=glue(H)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>H</term>
                <listitem>
                    <para>a vector of unique handle.</para>
                    <para>Only Matplot, Champ, Fec, Grayplot, Polyline, Fac3d, Plot3d, Arc, Rectangle, Segs, Text and Compound are supported</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>h_agreg</term>
                <listitem>
                    <para>a handle, the handle on the Compound entity.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Given a vector of handles, this function glue the corresponding
            entities in a single Compound and returns the handle on this new
            entity.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
scf(1);
plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
xrect(-1,1,2,2);
xarc(-0.5,0.5,2,2,0,360*64);
a=gca();
r=a.children(1);
c=a.children(2);
nc=glue([r,c]);
// a.children(1) and nc now both correspond to the
// newly created compound object,
a.children(1)
// which is then translated.
move(nc,[-1,-0.5]);
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="get">get</link>
            </member>
            <member>
                <link linkend="set">set</link>
            </member>
            <member>
                <link linkend="move">move</link>
            </member>
            <member>
                <link linkend="unglue">unglue</link>
            </member>
            <member>
                <link linkend="graphics_entities">graphics_entities</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
