1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution. The terms
7 // are also available at
8 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 // export a file using already set fileName and file Type
13 global %exportFileName;
16 if (%exportFileName == []) then
17 // filed not already selected : xinit has not been called
18 error(gettext("xend: xinit must be called before any action."));
23 curFigId = curFig.figure_id;
25 // choose export type depending on driver name
26 // for "Rec" and "X11" drivers thare actually nothing to do
30 xs2ps(curFigId, %exportFileName);
31 // delete figure used for export
35 xs2gif(curFigId, %exportFileName);
36 // delete figure used for export
40 xs2ppm(curFigId, %exportFileName);
41 // delete figure used for export
45 xs2fig(curFigId, %exportFileName);
46 // delete figure used for export
50 // export done reset exportFileName