Readd set_pos_fig_dim function
Jean-Baptiste Silvy [Thu, 22 Jan 2009 13:35:45 +0000 (14:35 +0100)]
scilab/modules/graphics/help/en_US/set_posfig_dim.xml [new file with mode: 0644]
scilab/modules/graphics/macros/set_posfig_dim.sci [new file with mode: 0644]

diff --git a/scilab/modules/graphics/help/en_US/set_posfig_dim.xml b/scilab/modules/graphics/help/en_US/set_posfig_dim.xml
new file mode 100644 (file)
index 0000000..1709220
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - Serge Steer
+ * 
+ * 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 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="set_posfig_dim">
+  <info>
+    <pubdate>$LastChangedDate$</pubdate>
+  </info>
+  <refnamediv>
+    <refname>set_posfig_dim</refname>
+    <refpurpose>change defaut transformation for
+  exporting in postscript</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <title>Calling Sequence</title>
+    <synopsis>set_posfig_dim(w,h)
+set_posfig_dim(0,0)</synopsis>
+  </refsynopsisdiv>
+  <refsection>
+    <title>Parameters</title>
+    <variablelist>
+      <varlistentry>
+        <term>w</term>
+        <listitem>
+          <para>graphic figure width, number of pixels</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>h</term>
+        <listitem>
+          <para>graphic figure height, number of pixels</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsection>
+  <refsection>
+    <title>Description</title>
+    <para><literal>set_posfig_dim(w,h)</literal> set the coordinates transformation to
+    be used when exporting a graphic window in postscript. The graphic figure
+    zoomed with ratios <literal>w/&lt;graphic figure width&gt;</literal>
+    horizontally and <literal>h/&lt;graphic figure height&gt;</literal>
+    vertically.</para>
+    <para>This function is particularily useful when one wants an export a
+    graphic figure exactly as it is shown on the screen. For that
+    <literal>w</literal> and <literal>h</literal> has to be set respectively to
+    <literal>&lt;graphic figure width&gt;</literal> and 
+    <literal>&lt;graphic figure height&gt;</literal></para>
+    <para><literal>set_posfig_dim(0,0)</literal> resets the default values:
+    <literal>w=600</literal>, <literal>h=424</literal>.</para>
+       
+       <para>
+               Function <literal>set_posfig_dim</literal> is obsolete and will be permanently removed in Scilab 5.2.
+               In current version, set_posfig_dim has no influence on exported files.
+               Their width and height instead match the exported figure <literal>axes_size</literal> property.
+       </para>
+  </refsection>
+  <refsection>
+    <title>Examples</title>
+    <programlisting role="example"><![CDATA[ 
+// make a figure with a specific shape
+f=scf(0);f.figure_size=[800,300];
+plot2d();
+set_posfig_dim(f.figure_size(1),f.figure_size(2));
+filename='foo.ps';
+xs2ps(0,filename);
+]]></programlisting>
+  </refsection>
+  <refsection>
+    <title>See Also</title>
+    <simplelist type="inline">
+      <member>
+        <link linkend="xs2ps">xs2ps</link>
+      </member>
+    </simplelist>
+  </refsection>
+  <refsection>
+    <title>Authors</title>
+    <para>Serge Steer INRIA</para>
+  </refsection>
+</refentry>
diff --git a/scilab/modules/graphics/macros/set_posfig_dim.sci b/scilab/modules/graphics/macros/set_posfig_dim.sci
new file mode 100644 (file)
index 0000000..43f893d
--- /dev/null
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Jean-Baptiste Silvy
+// 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
+
+
+function set_posfig_dim(w,h)
+       
+  warnobsolete("figure_size property","5.2");
+
+endfunction
+