<?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) INRIA - Fabrice Leray
 *
 * 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="drawlater">
    <refnamediv>
        <refname>drawlater</refname>
        <refpurpose>makes axes children
            invisible.
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>drawlater()</synopsis>
    </refsynopsisdiv>
    <refsection role="description">
        <title>Description</title>
        <para>This function can be used not to display immediately onto the
            <literal>current figure</literal> the next created graphics objects - i.e. by
            calling high level functions such as plotting functions or setting
            properties to existent objects. The <literal>immediate_drawing</literal>
            property of the current figure is set to <literal>'off'</literal> in order to
            postpon the next drawings.
        </para>
        <para>
            It can specially be used with the <literal>drawnow</literal> function.
        </para>
        <para>
            To enable back the <literal>immediate_drawing</literal> for the current
            figure, you can use <literal>drawnow</literal> function.
        </para>
        <para>
            <warning>
                Warning : note that between drawlater and drawnow calls, the current
                figure may have changed. Therefore, this must be used carefully.
            </warning>
        </para>
    </refsection>
    <refsection role="examples">
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
//Example :  one axes / one figure
drawlater();
xfarc(.25,.55,.1,.15,0,64*360);
xfarc(.55,.55,.1,.15,0,64*360);
xfrect(.3,.8,.3,.2);
xfrect(.2,.7,.5,.2);
xfrect(.32,.78,.1,.1);
xfrect(.44,.78,.14,.1);
xfrect(-.2,.4,1.5,.8);
xstring(0.33,.9,"A Scilab Car");
a=get("current_axes");
a.children(1).font_size=4;
a.children(1).font_style=4;
a.children(1).background=5;
a.children(3).background=8;
a.children(4).background=8;
a.children(5).background=17;
a.children(6).background=17;
a.children(7).background=25;
a.children(8).background=25;
xclick();
drawnow();

//Example 2:: two axes / one figure
clf
subplot(211)
drawlater    // what will be present in this axes will be displayed later
plot2d       // nothing is displayed => feeds the graphical buffer
subplot(212)
plot3d
drawnow      // the graphical buffer is flushed: all its contents become visible
 ]]></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="drawnow">drawnow</link>
            </member>
            <member>
                <link linkend="graphics_entities">graphics_entities</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
