help for graphic export updated.
Sylvestre Koumar [Tue, 27 May 2008 15:49:00 +0000 (15:49 +0000)]
Orientation option for vectoriel format added.
"Figure exporting, please wait..." message added when we export.

18 files changed:
scilab/modules/graphic_export/help/en_US/xs2bmp.xml
scilab/modules/graphic_export/help/en_US/xs2emf.xml
scilab/modules/graphic_export/help/en_US/xs2eps.xml
scilab/modules/graphic_export/help/en_US/xs2fig.xml [new file with mode: 0644]
scilab/modules/graphic_export/help/en_US/xs2gif.xml
scilab/modules/graphic_export/help/en_US/xs2jpg.xml
scilab/modules/graphic_export/help/en_US/xs2pdf.xml
scilab/modules/graphic_export/help/en_US/xs2png.xml
scilab/modules/graphic_export/help/en_US/xs2ppm.xml
scilab/modules/graphic_export/help/en_US/xs2ps.xml
scilab/modules/graphic_export/help/en_US/xs2svg.xml
scilab/modules/graphic_export/macros/xs2emf.sci
scilab/modules/graphic_export/macros/xs2fig.sci
scilab/modules/graphic_export/src/c/xs2file.c
scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/BitmapRenderer.java
scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/ExportRenderer.java
scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/FileExporter.java
scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/GL2PSRenderer.java

index 6078b20..c0b74a0 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2bmp">
+<refentry version="5.0-subset Scilab" xml:id="xs2bmp" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2bmp</refname>
-    <refpurpose>send graphics to a file in BMP syntax (Only
-  for Windows)</refpurpose>
+
+    <refpurpose>send graphics to a file in BMP syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>xs2bmp(win_num,filen)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
+
     <para><literal>xs2bmp</literal> sends the recorded graphics of the window
-    <literal>win_num</literal> in the file <literal>filen</literal> in BMP format. This
-    function works only if the selected driver is <literal>"Rec"</literal> in the
-    window <literal>win_num</literal> or if the window is in "new style".</para>
+    <literal>win_num</literal> in the file <literal>filen</literal> in BMP
+    format.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    //simple example
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //BMP export
     xs2bmp(0,'foo.bmp')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
+
     <para>A.C</para>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 1307b8e..fcc01bb 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2emf">
+<refentry version="5.0-subset Scilab" xml:id="xs2emf" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2emf</refname>
-    <refpurpose>send graphics to a file in EMF syntax (Only
-  for Windows)</refpurpose>
+
+    <refpurpose>send graphics to a file in EMF syntax (Only for
+    Windows)</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2emf(win_num,filen)</synopsis>
+
+    <synopsis>xs2emf(win_num,filen [,orientation])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term>orientation</term>
+
+        <listitem>
+          <para>optional character, with possible values 'p' (portrait) or 'l'
+          (landscape). The default value is 'p'.</para>
+        </listitem>
+      </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>The function xs2emf will not be available in version alpha</para>
+
     <para><literal>xs2emf</literal> sends the recorded graphics of the window
-    <literal>win_num</literal> in the file <literal>filen</literal> in EMF format. This
-    function works only if the selected driver is <literal>"Rec"</literal> in the
-    window <literal>win_num</literal> or if the window is in "new style".</para>
+    <literal>win_num</literal> in the file <literal>filen</literal> in EMF
+    format.</para>
+
+    <para>For format EMF we create an EPS file which will be convert into EMF
+    format by pstoedit.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    //simple example
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //EMF export
     xs2emf(0,'foo.emf')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
+
     <para>A.C</para>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 3d38c5a..6de7e99 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2eps">
+<refentry version="5.0-subset Scilab" xml:id="xs2eps" xml:lang="en"
+          xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg"
+          xmlns:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2eps</refname>
+
     <refpurpose>save graphics to a Postscript file.</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2eps(win_num,filen [,colored] [,orientation])</synopsis>
+
+    <synopsis>xs2eps(win_num,filen [,orientation])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>colored</term>
-        <listitem>
-          <para>optional integer or boolean. 0 (%f) means black and white and 1
-           (%t) means color.
-          The default value (-1) is to use a value compatible with the screen
-          status.</para>
-        </listitem>
-      </varlistentry>
+
       <varlistentry>
         <term>orientation</term>
+
         <listitem>
-          <para>optional character, with possible values 'p' (portrait) or 'l' (landscape).
-          The default value  is 'p'.</para>
+          <para>optional character, with possible values 'p' (portrait) or 'l'
+          (landscape). The default value is 'p'.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>The function xs2eps will not be available in version alpha</para>
+
     <para><literal>xs2eps</literal> saves the recorded graphics of the window
-    <literal>win_num</literal> to file <literal>filen</literal> in Postscript syntax. 
-    Note that <literal>filen</literal> must not have extension.</para>
-    <para><literal>xs2eps</literal> produces a complete encapsulated Postscrip file. 
-    It simply  calls <literal>xs2eps</literal> and then <literal>BEpsf</literal>.</para>
-    <para>This function works only if the selected driver is <literal>"Rec"</literal>
-    in the window <literal>win_num</literal> or if the window is in "new style". The
-    generated postscript file does not contrains the header part</para>
+    <literal>win_num</literal> to file <literal>filen</literal> in Postscript
+    syntax. Note that <literal>filen</literal> must not have extension.</para>
+
+    <para><literal>xs2eps</literal> produces a complete encapsulated Postscrip
+    file.<literal> </literal></para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+
+    <programlisting role="example"> 
     scf(0)
     plot2d()
-    // Postscript export
+    //EPS export
     filename='foo'; // ! no extension
     xs2eps(0,filename)
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="set_posfig_dim">set_posfig_dim</link>
-      </member>
-      <member>
-        <link linkend="printing">printing</link>
-      </member>
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="set_posfig_dim">set_posfig_dim</link></member>
+
+      <member><link linkend="printing">printing</link></member>
+
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
diff --git a/scilab/modules/graphic_export/help/en_US/xs2fig.xml b/scilab/modules/graphic_export/help/en_US/xs2fig.xml
new file mode 100644 (file)
index 0000000..42ae1df
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Sylvestre Koumar
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
+<refentry version="5.0-subset Scilab" xml:id="xs2emf" xml:lang="en"
+          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">
+  <info>
+    <pubdate>$LastChangedDate$</pubdate>
+  </info>
+
+  <refnamediv>
+    <refname>xs2fig</refname>
+
+    <refpurpose>send graphics to a file in FIG syntax</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <title>Calling Sequence</title>
+
+    <synopsis>xs2fig(win_num, filen [,orientation])</synopsis>
+  </refsynopsisdiv>
+
+  <refsection>
+    <title>Parameters</title>
+
+    <variablelist>
+      <varlistentry>
+        <term>win_num</term>
+
+        <listitem>
+          <para>integer scalar.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>filen</term>
+
+        <listitem>
+          <para>string, file name.</para>
+        </listitem>
+      </varlistentry>
+         
+         <varlistentry>
+        <term>orientation</term>
+
+        <listitem>
+          <para>optional character, with possible values 'p' (portrait) or 'l' (landscape). The default value is 'p'.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsection>
+
+  <refsection>
+    <title>Description</title>
+
+    <para><literal>xs2fig</literal> sends the recorded graphics of the window
+    <literal>win_num</literal> in the file <literal>filen</literal> in FIG
+    format. </para>
+
+    <para>For format FIG we create an EPS file which will be convert into FIG
+    format by pstoedit.</para>
+  </refsection>
+
+  <refsection>
+    <title>Examples</title>
+
+    <programlisting role="example"> 
+    //simple example
+    scf(0)
+    plot2d()
+    xs2fig(0,'foo.fig')
+  </programlisting>
+  </refsection>
+
+  <refsection>
+    <title>See Also</title>
+
+    <simplelist type="inline">
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2emf</link></member>
+    </simplelist>
+  </refsection>
+
+  <refsection>
+    <title>Authors</title>
+
+    <para>S.K</para>
+  </refsection>
+</refentry>
\ No newline at end of file
index 5d9cb9b..c4edc19 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2gif">
+<refentry version="5.0-subset Scilab" xml:id="xs2gif" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2gif</refname>
-    <refpurpose> send graphics to a file in GIF syntax</refpurpose>
+
+    <refpurpose>send graphics to a file in GIF syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2gif(win_num,filen,[color])</synopsis>
+
+    <synopsis>xs2gif(win_num,filen)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>color</term>
-        <listitem>
-          <para>optional integer. 0 means black and white and 1 means color. The default value is to use a value compatible  with the screen status.</para>
-        </listitem>
-      </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para><literal>xs2gif</literal> sends the recorded graphics of the
-    window <literal>win_num</literal> in the file <literal>filen</literal> in GIF format.
-    This function works only if the selected 
-    driver is <literal>"Rec"</literal> in the window
-    <literal>win_num</literal>  or if the window is in "new style".</para>
-    <para>To convert a sequence of "GIF"  files to an animated GIF file
-      one can use the "convert" program for ImageMagic
-      (http://www.imagemagick.org/)</para>
+
+    <para><literal>xs2gif</literal> sends the recorded graphics of the window
+    <literal>win_num</literal> in the file <literal>filen</literal> in GIF
+    format. </para>
+
+    <para>To convert a sequence of "GIF" files to an animated GIF file one can
+    use the "convert" program for ImageMagic
+    (http://www.imagemagick.org/)</para>
+
     <para>For example if one has generated a sequence of Gif files named
-      <literal>img*.gif</literal> it is possible to build an animated Gif file (named
-      anim.gif) by</para>
-    <programlisting><![CDATA[
+    <literal>img*.gif</literal> it is possible to build an animated Gif file
+    (named anim.gif) by</para>
+
+    <programlisting>
     
     convert -delay 10  img*.gif anim.gif  
      
-    ]]></programlisting>
+    </programlisting>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    //simple example
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //GIF export
     xs2gif(0,'foo.gif')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 0b4f989..de696dd 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2jpg">
+<refentry version="5.0-subset Scilab" xml:id="xs2jpg" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2jpg</refname>
-    <refpurpose>send graphics to a file in JPG syntax </refpurpose>
+
+    <refpurpose>send graphics to a file in JPG syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>xs2jpg(win_num,filen)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
+
     <para><literal>xs2jpg</literal> sends the recorded graphics of the window
-    <literal>win_num</literal> in the file <literal>filen</literal> in JPG format. This
-    function works only if the selected driver is <literal>"Rec"</literal> in the
-    window <literal>win_num</literal> or if the window is in "new style".</para>
+    <literal>win_num</literal> in the file <literal>filen</literal> in JPG
+    format. </para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    //simple example
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //JPG export
     xs2jpg(0,'foo.jpg')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
+
     <para>S.K</para>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 1222e0d..d66b5a1 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2pdf">
+<refentry version="5.0-subset Scilab" xml:id="xs2pdf" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2pdf</refname>
+
     <refpurpose>save graphics to a Postscript file.</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2pdf(win_num,filen [,colored] [,orientation])</synopsis>
+
+    <synopsis>xs2pdf(win_num,filen [,orientation])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>colored</term>
-        <listitem>
-          <para>optional integer or boolean. 0 (%f) means black and white and 1
-           (%t) means color.
-          The default value (-1) is to use a value compatible with the screen
-          status.</para>
-        </listitem>
-      </varlistentry>
+
       <varlistentry>
         <term>orientation</term>
+
         <listitem>
-          <para>optional character, with possible values 'p' (portrait) or 'l' (landscape).
-          The default value  is 'p'.</para>
+          <para>optional character, with possible values 'p' (portrait) or 'l'
+          (landscape). The default value is 'p'.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>The function xs2pdf will not be available in version alpha</para>
+
     <para><literal>xs2pdf</literal> saves the recorded graphics of the window
-    <literal>win_num</literal> to file <literal>filen</literal> in Postscript syntax. 
-    Note that <literal>filen</literal> must not have extension.</para>
-    <para><literal>xs2pdf</literal> produces a complete encapsulated Postscrip file. 
-    It simply  calls <literal>xs2pdf</literal> and then <literal>BEpsf</literal>.</para>
-    <para>This function works only if the selected driver is <literal>"Rec"</literal>
-    in the window <literal>win_num</literal> or if the window is in "new style". The
-    generated postscript file does not contrains the header part</para>
+    <literal>win_num</literal> to file <literal>filen</literal> in Postscript
+    syntax. Note that <literal>filen</literal> must not have extension.</para>
+
+    <para><literal>xs2pdf</literal> produces a complete encapsulated Postscrip
+    file.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+
+    <programlisting role="example"> 
     scf(0)
     plot2d()
-    // Postscript export
+    //PDF export
     filename='foo'; // ! no extension
     xs2pdf(0,filename)
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="set_posfig_dim">set_posfig_dim</link>
-      </member>
-      <member>
-        <link linkend="printing">printing</link>
-      </member>
-      <member>
-        <link linkend="xbasimp">xbasimp</link>
-      </member>
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="set_posfig_dim">set_posfig_dim</link></member>
+
+      <member><link linkend="printing">printing</link></member>
+
+      <member><link linkend="xbasimp">xbasimp</link></member>
+
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 802977e..6be7019 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2png">
+<refentry version="5.0-subset Scilab" xml:id="xs2png" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2png</refname>
-    <refpurpose>send graphics to a file in PNG syntax </refpurpose>
+
+    <refpurpose>send graphics to a file in PNG syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
+
     <synopsis>xs2png(win_num,filen)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
+
     <para><literal>xs2png</literal> sends the recorded graphics of the window
-    <literal>win_num</literal> in the file <literal>filen</literal> in PNG format. This
-    function works only if the selected driver is <literal>"Rec"</literal> in the
-    window <literal>win_num</literal> or if the window is in "new style".</para>
+    <literal>win_num</literal> in the file <literal>filen</literal> in PNG
+    format. </para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    //simple example
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //PNG export
     xs2png(0,'foo.png')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
+
   <refsection>
     <title>Authors</title>
+
     <para>S.K</para>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 0efef01..13c95f9 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2ppm">
+<refentry version="5.0-subset Scilab" xml:id="xs2ppm" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2ppm</refname>
-    <refpurpose> send graphics to a file in PPM syntax</refpurpose>
+
+    <refpurpose>send graphics to a file in PPM syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2ppm(win_num,filen,[color])</synopsis>
+
+    <synopsis>xs2ppm(win_num,filen)</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>color</term>
-        <listitem>
-          <para>optional integer. 0 means black and white and 1 means color. The default value is to use a value compatible  with the screen status.</para>
-        </listitem>
-      </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para><literal>xs2ppm</literal> sends the recorded graphics of the
-    window <literal>win_num</literal> in the file <literal>filen</literal> in PPM format.
-    This function works only if the selected 
-    driver is <literal>"Rec"</literal> in the window
-    <literal>win_num</literal> or if the window is in "new style".</para>
+
+    <para><literal>xs2ppm</literal> sends the recorded graphics of the window
+    <literal>win_num</literal> in the file <literal>filen</literal> in PPM
+    format. </para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-    scf(0)
+
+    <programlisting role="example">    scf(0)
     plot2d()
+    //PPM export
     xs2ppm(0,'foo.ppm')
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index 46f9aa5..de2884e 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2ps">
+<refentry version="5.0-subset Scilab" xml:id="xs2ps" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2ps</refname>
-    <refpurpose>send graphics to a file in PS
-  syntax</refpurpose>
+
+    <refpurpose>send graphics to a file in PS syntax</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2ps(win_num,filen,[color])</synopsis>
+
+    <synopsis>xs2ps(win_num,filen,[orientation])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
-        <term>color</term>
+        <term>orientation</term>
+
         <listitem>
-          <para>optional integer. 0 means black and white and 1 means color.
-          The default value is to use a value compatible with the screen
-          status.</para>
+          <para>optional character, with possible values 'p' (portrait) or 'l'
+          (landscape). The default value is 'p'.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>The function xs2ps will not be available in version alpha</para>
+
     <para><literal>xs2ps</literal> saves the recorded graphics of the window
-    <literal>win_num</literal> to file <literal>filen</literal> in Postscript syntax. The
-    <literal>filen</literal> must not have suffix extension.</para>
-    <para>Note that the generated Postscript file cannot be direcly printed since
-    it requires a header file. The Scilab command <literal>BEpsf</literal> or others
-    can be used to add a header file. The function <literal>xs2eps</literal> can be
-    used to directly produce an encapsulated Postscript file with an
+    <literal>win_num</literal> to file <literal>filen</literal> in Postscript
+    syntax. The <literal>filen</literal> must not have suffix
+    extension.</para>
+
+    <para>Note that the generated Postscript file cannot be direcly printed
+    since it requires a header file. The function <literal>xs2eps</literal>
+    can be used to directly produce an encapsulated Postscript file with an
     header.</para>
-    <para>This function works only if the selected driver is <literal>"Rec"</literal>
-    in the window <literal>win_num</literal> or if the window is in "new style". The
-    generated postscript file does not contrains the header part</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+
+    <programlisting role="example">
 scf(0);
 plot2d();
 // Postcript export
 filename='foo.ps';
-xs2ps(0,filename)
-// Gif export
-xs2gif(0,'foo.gif');
-// ppm export
-xs2ppm(0,'foo.ppm');
-]]></programlisting>
+xs2ps(0,filename);</programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="set_posfig_dim">set_posfig_dim</link>
-      </member>
-      <member>
-        <link linkend="printing">printing</link>
-      </member>
-      <member>
-        <link linkend="xbasimp">xbasimp</link>
-      </member>
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2svg">xs2svg</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="set_posfig_dim">set_posfig_dim</link></member>
+
+      <member><link linkend="printing">printing</link></member>
+
+      <member><link linkend="xbasimp">xbasimp</link></member>
+
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2svg">xs2svg</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index bfd67ea..8cb8b8e 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="xs2svg">
+<refentry version="5.0-subset Scilab" xml:id="xs2svg" xml:lang="en"
+          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">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
+
   <refnamediv>
     <refname>xs2svg</refname>
+
     <refpurpose>save graphics to a Postscript file.</refpurpose>
   </refnamediv>
+
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>xs2svg(win_num,filen [,colored] [,orientation])</synopsis>
+
+    <synopsis>xs2svg(win_num,filen [,orientation])</synopsis>
   </refsynopsisdiv>
+
   <refsection>
     <title>Parameters</title>
+
     <variablelist>
       <varlistentry>
         <term>win_num</term>
+
         <listitem>
           <para>integer scalar or vector .</para>
         </listitem>
       </varlistentry>
+
       <varlistentry>
         <term>filen</term>
+
         <listitem>
           <para>string, file name.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>colored</term>
-        <listitem>
-          <para>optional integer or boolean. 0 (%f) means black and white and 1
-           (%t) means color.
-          The default value (-1) is to use a value compatible with the screen
-          status.</para>
-        </listitem>
-      </varlistentry>
+
       <varlistentry>
         <term>orientation</term>
+
         <listitem>
-          <para>optional character, with possible values 'p' (portrait) or 'l' (landscape).
-          The default value  is 'p'.</para>
+          <para>optional character, with possible values 'p' (portrait) or 'l'
+          (landscape). The default value is 'p'.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
+
   <refsection>
     <title>Description</title>
-    <para>The function xs2svg will not be available in version alpha</para>
+
     <para><literal>xs2svg</literal> saves the recorded graphics of the window
-    <literal>win_num</literal> to file <literal>filen</literal> in Postscript syntax. 
-    Note that <literal>filen</literal> must not have extension.</para>
-    <para><literal>xs2svg</literal> produces a complete encapsulated Postscrip file. 
-    It simply  calls <literal>xs2svg</literal> and then <literal>BEpsf</literal>.</para>
-    <para>This function works only if the selected driver is <literal>"Rec"</literal>
-    in the window <literal>win_num</literal> or if the window is in "new style". The
-    generated postscript file does not contrains the header part</para>
+    <literal>win_num</literal> to file <literal>filen</literal> in Postscript
+    syntax. Note that <literal>filen</literal> must not have extension.</para>
+
+    <para><literal>xs2svg</literal> produces a complete encapsulated Postscrip
+    file.</para>
   </refsection>
+
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+
+    <programlisting role="example"> 
     scf(0)
     plot2d()
-    // Postscript export
+    //SVG export
     filename='foo'; // ! no extension
     xs2svg(0,filename)
-  ]]></programlisting>
+  </programlisting>
   </refsection>
+
   <refsection>
     <title>See Also</title>
+
     <simplelist type="inline">
-      <member>
-        <link linkend="set_posfig_dim">set_posfig_dim</link>
-      </member>
-      <member>
-        <link linkend="printing">printing</link>
-      </member>
-      <member>
-        <link linkend="xbasimp">xbasimp</link>
-      </member>
-      <member>
-        <link linkend="xs2bmp">xs2bmp</link>
-      </member>
-      <member>
-        <link linkend="xs2gif">xs2gif</link>
-      </member>
-      <member>
-        <link linkend="xs2jpg">xs2jpg</link>
-      </member>
-      <member>
-        <link linkend="xs2png">xs2png</link>
-      </member>
-      <member>
-        <link linkend="xs2ppm">xs2ppm</link>
-      </member>
-      <member>
-        <link linkend="xs2eps">xs2eps</link>
-      </member>
-      <member>
-        <link linkend="xs2pdf">xs2pdf</link>
-      </member>
-      <member>
-        <link linkend="xs2ps">xs2ps</link>
-      </member>
-      <member>
-        <link linkend="xs2fig">xs2fig</link>
-      </member>
-      <member>
-        <link linkend="xs2emf">xs2emf</link>
-      </member>
+      <member><link linkend="set_posfig_dim">set_posfig_dim</link></member>
+
+      <member><link linkend="printing">printing</link></member>
+
+      <member><link linkend="xbasimp">xbasimp</link></member>
+
+      <member><link linkend="xs2bmp">xs2bmp</link></member>
+
+      <member><link linkend="xs2gif">xs2gif</link></member>
+
+      <member><link linkend="xs2jpg">xs2jpg</link></member>
+
+      <member><link linkend="xs2png">xs2png</link></member>
+
+      <member><link linkend="xs2ppm">xs2ppm</link></member>
+
+      <member><link linkend="xs2eps">xs2eps</link></member>
+
+      <member><link linkend="xs2pdf">xs2pdf</link></member>
+
+      <member><link linkend="xs2ps">xs2ps</link></member>
+
+      <member><link linkend="xs2fig">xs2fig</link></member>
+
+      <member><link linkend="xs2emf">xs2emf</link></member>
     </simplelist>
   </refsection>
-</refentry>
+</refentry>
\ No newline at end of file
index e800ae5..26c7294 100644 (file)
@@ -7,12 +7,18 @@
 // are also available at    
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
-function xs2emf(figureNumber, fileName)
+function xs2emf(figureNumber, fileName, orientation)
+
+       //When the graphic-export is too long, we inform the user that the figure is exporting
+       f = gcf();
+       oldInfoMessage = f.info_message;
+       f.info_message = "Exporting figure, please wait...";
+       
 
        [lhs,rhs]=argn(0);
        
        //Input arguments checking
-       if rhs <> 2 then
+       if rhs <> 2 & rhs <> 3 then
                error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"), "xs2emf",2));
                return;
        end
@@ -29,6 +35,21 @@ function xs2emf(figureNumber, fileName)
                return;
        end
        
+       //third argument checking
+       if rhs == 3 then  
+               if orientation == 'l' | orientation == 'landscape' then 
+                       orientation = "landscape";
+               elseif orientation == 'p' | orientation == 'portrait' then 
+                       orientation = "portrait"; 
+               else
+                       error(msprintf(gettext("%s: Wrong input argument #%d: %s or %s expected.\n"), "xs2emf", 3, "portrait", "landscape"));
+                       //error(msprintf(gettext("%s: Wrong type for input argument: String ""landscape"" or ""portrait"" expected.\n"), "xs2emf"));
+                       return;
+               end
+       else
+               orientation = "portrait";
+       end
+       
        if ~MSDOS then
          // os is a unix one
          // check that pstoedit is available on the computer
@@ -58,7 +79,7 @@ function xs2emf(figureNumber, fileName)
        
        //create the eps file
        fileExport = TMPDIR + filesep() + fname + ".eps";       
-       xs2eps(figureNumber, fileExport);
+       xs2eps(figureNumber, fileExport, orientation);
                
        // convert it to emf
        //get short  path name for windows because path is > then 6 caracters
@@ -88,6 +109,9 @@ function xs2emf(figureNumber, fileName)
        
        //delete the temporary eps file 
        mdelete(fileExport);
+       
+       //Put back the old infoMessage
+       f.info_message = oldInfoMessage;
   
 endfunction
 
index 99da80a..bbc6629 100644 (file)
@@ -7,13 +7,18 @@
 // are also available at    
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
-function xs2fig(figureNumber, fileName)
+function xs2fig(figureNumber, fileName, orientation)
+
+       //When the graphic-export is too long, we inform the user that the figure is exporting
+       f = gcf();
+       oldInfoMessage = f.info_message;
+       f.info_message = "Exporting figure, please wait...";
 
        [lhs,rhs]=argn(0);
        
        //Input arguments checking
-       if rhs <> 2 then
-               error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"), "xs2fig",2));
+       if rhs <> 2 & rhs <> 3 then
+               error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"), "xs2emf",2));
                return;
        end
 
@@ -29,6 +34,20 @@ function xs2fig(figureNumber, fileName)
                return;
        end
        
+       //third argument checking
+       if rhs == 3 then  
+               if orientation == 'l' | orientation == 'landscape' then 
+                       orientation = "landscape";
+               elseif orientation == 'p' | orientation == 'portrait' then 
+                       orientation = "portrait"; 
+               else
+                       error(msprintf(gettext("%s: Wrong input argument #%d: %s or %s expected.\n"), "xs2fig", 3, "portrait", "landscape"));
+                       return;
+               end
+       else
+               orientation = "portrait";
+       end
+       
        if ~MSDOS then
          // os is a unix one
          // check that pstoedit is available on the computer
@@ -60,7 +79,7 @@ function xs2fig(figureNumber, fileName)
        
        //create the eps file
        fileExport = TMPDIR + filesep() + fname + ".eps";       
-       xs2eps(figureNumber, fileExport);
+       xs2eps(figureNumber, fileExport, orientation);
                
        // convert it to fig
        //get short  path name for windows because path is > then 6 caracters
@@ -90,5 +109,8 @@ function xs2fig(figureNumber, fileName)
        
        //delete the temporary eps file 
        mdelete(fileExport);
+       
+       //Put back the old infoMessage
+       f.info_message = oldInfoMessage;
   
 endfunction
index c158ffa..296fdb1 100644 (file)
 #include "localization.h"
 #include "SetJavaProperty.h"
 #include "Scierror.h"
+
+/*--------------------------------------------------------------------------*/
+BOOL isVectorialExport(ExportFileType fileType);
 /*--------------------------------------------------------------------------*/
 int xs2file(char * fname, ExportFileType fileType )
 {
   CheckLhs(0,1);
-  CheckRhs(2,2);
+  if (isVectorialExport(fileType))
+  {
+       CheckRhs(2,3);
+  }
+  else
+  {
+       CheckRhs(2,2);
+  }
+  
   if ( (GetType(2) == sci_strings) && IsAScalar(1) )
   {
     integer m1,n1,l1;
     int figurenum=-1;
     GetRhsVar(1,MATRIX_OF_INTEGER_DATATYPE,&m1,&n1,&l1);
     figurenum = *istk(l1);
-    if (figurenum>=0)
+    if (figurenum >= 0)
     {
       char * fileName=NULL;
          int status;
+      ExportOrientation orientation = EXPORT_PORTRAIT; /* default orientation */
+               
+         /* Get orientation */
+         if (Rhs == 3)
+         {
+               int nbCol;
+               int nbRow;
+               int stackPointer;
+               char * sciOrientation;
+               /* vectorial export with orientation specified */
+               if (GetType(3) != sci_strings)
+               {
+                       Scierror(999,_("%s: Wrong input argument #%d: '%s' or '%s' expected.\n"),fname, 3, "portrait", "landscape");
+                   return 0;
+               }
+               GetRhsVar(3,STRING_DATATYPE,&nbRow,&nbCol,&stackPointer);
+               sciOrientation = cstk(stackPointer);
+               /* Value should be 'landscape' or 'portrait' but check only the first character */
+               /* for compatibility with Scilab 4*/
+               if (sciOrientation[0] == 'l')
+               {
+                       orientation = EXPORT_LANDSCAPE;
+               }
+               else if( sciOrientation[0] == 'p')
+               {
+                       orientation = EXPORT_PORTRAIT;
+               }
+               else
+               {
+                       Scierror(999,_("%s: Wrong input argument #%d: '%s' or '%s' expected.\n"),fname, 3, "portrait", "landscape");
+                   return 0;
+               }
+
+         }
+
       GetRhsVar(2,STRING_DATATYPE,&m1,&n1,&l1);
       fileName = cstk(l1);
 
       /* Call the function for exporting file */
-      status = exportToFile(getFigureFromIndex(figurenum), fileName, fileType, EXPORT_PORTRAIT);
+      status = exportToFile(getFigureFromIndex(figurenum), fileName, fileType, orientation);
 
          switch(status)
          {
@@ -56,7 +102,7 @@ int xs2file(char * fname, ExportFileType fileType )
     }
     else
     {
-      Scierror(999,_("%s: Wrong input argument: %s expected.\n"),fname,">=0");
+      Scierror(999,_("%s: Wrong type for input argument #%d: Positive integer expected.\n"),fname, 1);
       return 0;
     }
 
@@ -65,13 +111,13 @@ int xs2file(char * fname, ExportFileType fileType )
   {
     if ( IsAScalar(1) )
     {
-      Scierror(999,_("%s: Wrong type for first input argument: integer scalar expected.\n"),fname);
-      return 0;
+               Scierror(999,_("%s: Wrong type for input argument #%d: Positive integer expected.\n"),fname, 1);
+        return 0;
     }
     if ( GetType(2) != sci_strings)
     {
-      Scierror(999,_("%s: Wrong type for second input argument: String expected.\n"),fname);
-      return 0;
+               Scierror(999,_("%s: Wrong type for input argument #%d: Single character string expected.\n"),fname, 2);
+        return 0;
     }
   }
 
@@ -79,3 +125,11 @@ int xs2file(char * fname, ExportFileType fileType )
   return 0;
 }
 /*--------------------------------------------------------------------------*/
+BOOL isVectorialExport(ExportFileType fileType)
+{
+       return   fileType == EPS_EXPORT
+                 || fileType == PS_EXPORT
+                 || fileType == PDF_EXPORT
+                 || fileType == SVG_EXPORT;
+}
+/*--------------------------------------------------------------------------*/
\ No newline at end of file
index fa2f543..c4dbb83 100644 (file)
@@ -28,9 +28,10 @@ public class BitmapRenderer  extends ExportRenderer {
         * Default constructor
         * @param fileName name of the figure to render
         * @param fileType type of the figure to render
+        * @param fileOrientation orientation of the figure to render
         */
-       public BitmapRenderer(String fileName, int fileType) {
-               super(fileName, fileType);
+       public BitmapRenderer(String fileName, int fileType, int fileOrientation) {
+               super(fileName, fileType, fileOrientation);
        }
        
        /**
index a91a9ae..7983c20 100644 (file)
@@ -43,10 +43,15 @@ public abstract class ExportRenderer implements GLEventListener {
        public static final int PDF_EXPORT = 7;
        public static final int SVG_EXPORT = 8;
        public static final int PS_EXPORT = 9;
+       
+       /** Orientation of the exported figure */
+       public static final int PORTRAIT = 0;
+       public static final int LANDSCAPE = 1;
 
        /** File name & file type */
        private static String fileName;
        private static int fileType;
+       private static int fileOrientation;
        
        /** give the type of the error */
        private static int errorNumber;
@@ -55,10 +60,12 @@ public abstract class ExportRenderer implements GLEventListener {
         * Constructor
         * @param fileName name of the file
         * @param fileType type of the file
+        * @param fileOrientation orientation of the file
         */
-       protected ExportRenderer(String fileName, int fileType) {
+       protected ExportRenderer(String fileName, int fileType, int fileOrientation) {
                this.fileName = fileName;
                this.fileType = fileType;       
+               this.fileOrientation = fileOrientation;
                removeExtension();
        }       
 
@@ -67,9 +74,10 @@ public abstract class ExportRenderer implements GLEventListener {
         * @param figureIndex type of the file
         * @param fileName name of the file
         * @param fileType type of the file
+        * @param fileOrientation orientation of the file
         * @return GL2PSRenderer export a postscript screen-shot
         */
-       public static ExportRenderer createExporter(int figureIndex, String fileName, int fileType) {
+       public static ExportRenderer createExporter(int figureIndex, String fileName, int fileType, int fileOrientation) {
                
                GL2PS gl2ps = new GL2PS();
                
@@ -80,12 +88,12 @@ public abstract class ExportRenderer implements GLEventListener {
                case JPG_EXPORT:
                case PNG_EXPORT:
                case PPM_EXPORT:
-                       return new BitmapRenderer(fileName, fileType);
+                       return new BitmapRenderer(fileName, fileType, fileOrientation);
                case EPS_EXPORT:
                case PDF_EXPORT:
                case SVG_EXPORT:
                case PS_EXPORT:
-                       return new GL2PSRenderer(figureIndex, fileName, fileType);
+                       return new GL2PSRenderer(figureIndex, fileName, fileType, fileOrientation);
                default: System.err.println(ExportRenderer.INVALID_FILE);
                }
                return null;                    
@@ -121,6 +129,20 @@ public abstract class ExportRenderer implements GLEventListener {
         */
        public void setFileType(int fileType) {
                this.fileType = fileType;
+       }       
+
+       /**
+        * @return the fileOrientation
+        */
+       public static int getFileOrientation() {
+               return fileOrientation;
+       }
+
+       /**
+        * @param fileOrientation the fileOrientation to set
+        */
+       public static void setFileOrientation(int fileOrientation) {
+               ExportRenderer.fileOrientation = fileOrientation;
        }
 
        /**
index ae0fee1..76c2fd9 100644 (file)
@@ -21,9 +21,12 @@ import org.scilab.modules.renderer.figureDrawing.DrawableFigureGL;
  * @author Jean-Baptiste Silvy
  */
 public class FileExporter {
+       
+       /** Export waiting message */
+       private static final String exportingMessage = "Exporting figure, please wait...";
 
        /**
-        * Defualt constuctor
+        * Default constructor
         */
        protected FileExporter() {
                
@@ -31,13 +34,14 @@ public class FileExporter {
        
        /**
         * Export a figure into a file
-        * @param figureIndex index of tghe figure to export
+        * @param figureIndex index of the figure to export
         * @param fileName name of the file to create
         * @param fileType kind of the file
+        * @param fileOrientation orientation of the file
         * @return 0 if everything worked fine, a non null integer if an exception occured
         *         depending on the kind of error
         */
-       public static int fileExport(int figureIndex, String fileName, int fileType) {
+       public static int fileExport(int figureIndex, String fileName, int fileType, int fileOrientation) {
                DrawableFigureGL exportedFig = FigureMapper.getCorrespondingFigure(figureIndex);
                
                if (exportedFig == null) {
@@ -45,13 +49,20 @@ public class FileExporter {
                        return ExportRenderer.IOEXCEPTION_ERROR;
                }               
                
+               //When the graphic-export is too long, we inform the user that the figure is exporting
+               String oldInfoMessage = exportedFig.getInfoMessage();
+               exportedFig.setInfoMessage(exportingMessage);
+               
                ExportRenderer export;          
-               export = ExportRenderer.createExporter(figureIndex, fileName, fileType);
+               export = ExportRenderer.createExporter(figureIndex, fileName, fileType, fileOrientation);
                                
                exportedFig.getRenderingTarget().addGLEventListener(export);
                exportedFig.drawCanvas();
                exportedFig.getRenderingTarget().removeGLEventListener(export);
                
+               //Put back the old infoMessage
+               exportedFig.setInfoMessage(oldInfoMessage);
+               
                return ExportRenderer.getErrorNumber();         
        }       
 }
index e5c18b7..fd693b0 100644 (file)
@@ -47,9 +47,10 @@ public class GL2PSRenderer extends ExportRenderer {
         * @param figureIndex index of the figure
         * @param fileName file name
         * @param fileType file type
+        * @param fileOrientation file orientation
         */
-       public GL2PSRenderer(int figureIndex, String fileName, int fileType) {
-               super(fileName, fileType);
+       public GL2PSRenderer(int figureIndex, String fileName, int fileType, int fileOrientation) {
+               super(fileName, fileType, fileOrientation);
                this.figureIndex = figureIndex;
                setGL2PSFile(fileName, fileType);               
        }
@@ -73,7 +74,7 @@ public class GL2PSRenderer extends ExportRenderer {
                                                                           format = GL2PS.GL2PS_SVG;
                break;                            
                case ExportRenderer.PS_EXPORT:  setFileName(ExportRenderer.getFileName() + ".ps");
-                  format = GL2PS.GL2PS_PS;
+                                                                          format = GL2PS.GL2PS_PS;
                break;  
                default: return ExportRenderer.INVALID_FILE;
                }
@@ -91,15 +92,26 @@ public class GL2PSRenderer extends ExportRenderer {
                sciRend = new SciRenderer(this.figureIndex);
                
                setErrorNumber(ExportRenderer.SUCCESS);
-               
+                               
                //Check if we have the permission to export
                File filePermission = new File(ExportRenderer.getFileName());
                if (checkWritePermission(filePermission) == ExportRenderer.SUCCESS) {
                        
-                       int gl2psBeginPageStatut = gl2ps.gl2psBeginPage("MyTitle", "MySoftware", null, format, 
-                                       GL2PS.GL2PS_SIMPLE_SORT, GL2PS.GL2PS_USE_CURRENT_VIEWPORT | GL2PS.GL2PS_BEST_ROOT
-                                       /*| GL2PS.GL2PS_OCCLUSION_CULL | GL2PS.GL2PS_LANDSCAPE | GL2PS.GL2PS_DRAW_BACKGROUND*/,
-                                       GL.GL_RGBA, 0, null, null, null, null, 
+                       DrawableFigureGL exportedFigure = FigureMapper.getCorrespondingFigure(figureIndex);
+                       
+                       //int[] viewport = exportedFigure.getViewport();
+                       //int[] viewport = {0, 0, 780, 600};
+                       
+                       int exportOrientation;
+                       if (ExportRenderer.getFileOrientation() == 1) {
+                               exportOrientation = GL2PS.GL2PS_LANDSCAPE;
+                       } else {
+                               exportOrientation = 0;
+                       }                                               
+                       
+                       int gl2psBeginPageStatut = gl2ps.gl2psBeginPage(exportedFigure.getTitle(), "Scilab", null, format, 
+                                       GL2PS.GL2PS_SIMPLE_SORT, GL2PS.GL2PS_USE_CURRENT_VIEWPORT | GL2PS.GL2PS_BEST_ROOT 
+                                       | exportOrientation, GL.GL_RGBA, 0, null, null, null, null, 
                                        0, 0, 0, buffsize, ExportRenderer.getFileName());       
 
                        if (gl2psBeginPageStatut != GL2PS.GL2PS_SUCCESS) {
@@ -112,7 +124,7 @@ public class GL2PSRenderer extends ExportRenderer {
                        GL2PSGL newGL = new GL2PSGL(gl, gl2ps);
                        gLDrawable.setGL(newGL);
 
-                       DrawableFigureGL exportedFigure = FigureMapper.getCorrespondingFigure(figureIndex);
+                       
                        exportedFigure.setTextRendererFactory(new PSTextRendererFactory());
                        exportedFigure.setArcRendererFactory(new FastArcRendererFactory());
                        exportedFigure.setShadeFacetDrawer(new GL2PSShadeFacetDrawer());