* bug 15269: xgetech() tagged obsolete 21/19421/4
Samuel GOUGEON [Sun, 10 Sep 2017 17:30:41 +0000 (19:30 +0200)]
  http://bugzilla.scilab.org/15269

Change-Id: I9dbcf9e5bb4ac73aedf5b5b8c8c7e6363ea6f44c

22 files changed:
scilab/CHANGES.md
scilab/modules/graphics/help/en_US/Graphics.xml
scilab/modules/graphics/help/en_US/xgetech.xml
scilab/modules/graphics/help/en_US/xsetech.xml
scilab/modules/graphics/help/fr_FR/Graphics.xml
scilab/modules/graphics/help/fr_FR/xgetech.xml
scilab/modules/graphics/help/fr_FR/xsetech.xml
scilab/modules/graphics/help/ja_JP/Graphics.xml
scilab/modules/graphics/help/ja_JP/xgetech.xml
scilab/modules/graphics/help/ja_JP/xsetech.xml
scilab/modules/graphics/help/pt_BR/Graphics.xml
scilab/modules/graphics/help/pt_BR/xgetech.xml
scilab/modules/graphics/help/pt_BR/xsetech.xml
scilab/modules/graphics/help/ru_RU/Graphics.xml
scilab/modules/graphics/macros/gr_macros.sce
scilab/modules/graphics/macros/xgetech.sci
scilab/modules/graphics/tests/nonreg_tests/bug_2405.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_2405.tst
scilab/modules/signal_processing/help/en_US/spectral_estimation/czt.xml
scilab/modules/signal_processing/help/fr_FR/spectral_estimation/czt.xml
scilab/modules/signal_processing/help/ja_JP/spectral_estimation/czt.xml
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp

index 689a50a..8f7827a 100644 (file)
@@ -311,6 +311,7 @@ Obsolete functions or features
 * `square` will be removed from Scilab 6.1. Please use `gcf().axes_size` and `replot` instead.
 * `nanmin` is obsolete and will be removed in Scilab 6.1. Please use `min` instead.
 * `nanmax` is obsolete and will be removed in Scilab 6.1. Please use `max` instead.
+* `xgetech` is obsolete and will be removed in Scilab 6.1. Please use `gca` instead.
 
 
 Removed Functions
index 42ed391..f1885e5 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xgetech">xgetech</link>
-                </term>
-                <listitem>
-                    <para>Get the current graphics scale</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="xchange">xchange</link>
                 </term>
                 <listitem>
index 4c28377..64edd57 100644 (file)
@@ -16,7 +16,9 @@
 <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="xgetech">
     <refnamediv>
         <refname>xgetech</refname>
-        <refpurpose>get the current graphics scale</refpurpose>
+        <refpurpose>
+            get the current graphics scale  <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+          This function is obsolete. It will be removed from Scilab 6.1. Please use
+          <literal>ax=gca(); (ax.axes_bounds, ax.data_bounds(:)', ax.log_flags, ax.margins)</literal>
+          or any combination instead.
+        </warning>
         <para>
             <function>xgetech</function> returns the current graphics scale (of
             the current window). The rectangle <literal>[xmin, ymin, xmax,
@@ -119,4 +126,15 @@ xsetech([0,0.5,1.0,0.5])
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    xgetech() is tagged obsolete for removal from Scilab 6.1.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index f601474..8cf51a0 100644 (file)
@@ -180,9 +180,6 @@ clf()
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="xgetech">xgetech</link>
-            </member>
-            <member>
                 <link linkend="subplot">subplot</link>
             </member>
             <member>
index 01021d7..6203759 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xgetech">xgetech</link>
-                </term>
-                <listitem>
-                    <para>donne l'échelle graphique courante</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="xchange">xchange</link>
                 </term>
                 <listitem>
index 067f4c1..071552b 100644 (file)
@@ -2,7 +2,9 @@
 <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="fr" xml:id="xgetech">
     <refnamediv>
         <refname>xgetech</refname>
-        <refpurpose>récupération de l'échelle graphique courante   </refpurpose>
+        <refpurpose>
+            récupération de l'échelle graphique courante <emphasis role="bold">(obsolète)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+          Cette fonction est obsolète. Elle sera retirée de Scilab 6.1. SVP utiliser
+          <literal>ax=gca(); (ax.axes_bounds, ax.data_bounds(:)', ax.log_flags, ax.margins)</literal>
+          ou toute combinaison utile à la place.
+        </warning>
         <para>
             <literal>xgetech</literal> renvoie l'échelle graphique de la fenêtre courante.
             Le rectangle [xmin,ymin,xmax,ymax] donné par
@@ -91,4 +98,15 @@ clf();
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Historique</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    xgetech() est étiquetée obsolète pour un retrait de Scilab 6.1.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 980c078..cfa774a 100644 (file)
@@ -127,7 +127,7 @@ xsetech([0,0,1,1])
 
 // Un dessin avec arect change
 clf('reset')
-xsetech(arect=[0,0,0,0]) 
+xsetech(arect=[0,0,0,0])
 x = 1:0.1:10;
 plot2d(x',sin(x)')
  ]]></programlisting>
@@ -151,9 +151,6 @@ clf('reset')
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
-                <link linkend="xgetech">xgetech</link>
-            </member>
-            <member>
                 <link linkend="subplot">subplot</link>
             </member>
             <member>
index b373782..0457d57 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xgetech">xgetech</link>
-                </term>
-                <listitem>
-                    <para>カレントのグラフィックのスケールを取得</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="xchange">xchange</link>
                 </term>
                 <listitem>
index afd86ff..8943e26 100644 (file)
@@ -28,7 +28,9 @@
 
         <refname>xgetech</refname>
 
-        <refpurpose>カレントのグラフィックスケールを取得</refpurpose>
+        <refpurpose>
+           カレントのグラフィックスケールを取得  <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
 
     </refnamediv>
 
     <refsection>
 
         <title>説明</title>
+        <warning>
+          This function is obsolete. It will be removed from Scilab 6.1. Please use
+          <literal>ax=gca(); (ax.axes_bounds, ax.data_bounds(:)', ax.log_flags, ax.margins)</literal>
+          or any combination instead.
+        </warning>
 
         <para>
 
@@ -219,6 +226,17 @@ clf('reset');
         </simplelist>
 
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    xgetech() is tagged obsolete for removal from Scilab 6.1.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 
 </refentry>
 
index 073c75a..499d0e5 100644 (file)
@@ -354,12 +354,6 @@ clf()
 
             <member>
 
-                <link linkend="xgetech">xgetech</link>
-
-            </member>
-
-            <member>
-
                 <link linkend="subplot">subplot</link>
 
             </member>
index a4d50fd..21315fe 100644 (file)
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>xgetech</term>
-                <listitem>
-                    <para>retorna a escala de gráficos corrente</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
                 <term>xchange</term>
                 <listitem>
                     <para>conversão de coordenadas reais para coordenadas pixeis</para>
index 97219f6..6a8ecce 100644 (file)
@@ -16,7 +16,9 @@
 <refentry 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" xmlns:scilab="http://www.scilab.org" xml:id="xgetech" xml:lang="pt">
     <refnamediv>
         <refname>xgetech</refname>
-        <refpurpose>retorna a escala de gráficos corrente</refpurpose>
+        <refpurpose>
+          retorna a escala de gráficos corrente  <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Seqüência de Chamamento</title>
     </refsection>
     <refsection>
         <title>Descrição</title>
+        <warning>
+          This function is obsolete. It will be removed from Scilab 6.1. Please use
+          <literal>ax=gca(); (ax.axes_bounds, ax.data_bounds(:)', ax.log_flags, ax.margins)</literal>
+          or any combination instead.
+        </warning>
         <para>
             <literal>xgetech</literal> retorna a escala de gráficos corrente (da
             janela corrente). O retângulo [xmin,ymin,xmax,ymax] dado por
@@ -103,4 +110,15 @@ clf reset;
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    xgetech() is tagged obsolete for removal from Scilab 6.1.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 44f3a88..a0db3c5 100644 (file)
@@ -141,9 +141,6 @@ clf('reset')
         <title>Ver Também </title>
         <simplelist type="inline">
             <member>
-                <link linkend="xgetech">xgetech</link>
-            </member>
-            <member>
                 <link linkend="subplot">subplot</link>
             </member>
             <member>
index 5057359..58ed0f6 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xgetech">xgetech</link>
-                </term>
-                <listitem>
-                    <para>Получение масштаба текущего графика</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="xchange">xchange</link>
                 </term>
                 <listitem>
index 7dc4af7..71f2c6c 100644 (file)
@@ -375,7 +375,8 @@ function [sd1]=fleche(sd,del)
         [oi1,oi2,of1,of2,but]=xgetm(d_arrow);
         if but==2 then sd1=list();return,end
         o1=[oi1;of1],o2=[oi2;of2];
-        [r1,r2]=xgetech()
+        ax = gca();
+        [r1, r2] = (ax.axes_bounds, ax.data_bounds(:)');
         sz=1/(40*min(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
         sd1=list("fleche",o1,o2,sz);
         d_arrow(o1,o2,sz);
@@ -623,7 +624,8 @@ function d_arrow(c1,c2,x1,x2)
     if rhs<>4 then
         sz=x1;x1=c1(2);c1=c1(1);x2=c2(2);c2=c2(1);
     else
-        [r1,r2]=xgetech()
+        ax = gca();
+        [r1, r2] = (ax.axes_bounds, ax.data_bounds(:)');
         sz=1/(40*min(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
     end
     xarrows([c1;x1],[c2;x2],sz,-1);
index 1d5b506..f22dd31 100644 (file)
@@ -13,7 +13,7 @@
 //
 //
 function [wrect, frect, logflag, arect]=xgetech()
-
+    warnobsolete("""a=gca();[a.axes_bounds a.data_bounds a.log_flags a.margins]""", "6.1");
     a = gca();
     wrect = a.axes_bounds;
     frect = matrix(a.data_bounds, 1, 4);
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_2405.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_2405.dia.ref
deleted file mode 100644 (file)
index 5895089..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008-2008 - INRIA - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 2405 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=2405
-//
-// <-- Short Description -->
-// xsetech() creates an empty (covering white) axes frame, which shouldn't be, when
-// used in conjunction with subplot().
-//
-clf()
-subplot(121); plot2d();
-e=xgetech(); xsetech(e)
-subplot(122); plot2d()
-// check that the first plot did not become white
index e3853c8..c4019b2 100644 (file)
@@ -6,6 +6,8 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- INTERACTIVE TEST -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 2405 -->
 //
 // <-- Short Description -->
 // xsetech() creates an empty (covering white) axes frame, which shouldn't be, when
 // used in conjunction with subplot().
-// 
+//
 
 clf()
 subplot(121); plot2d();
-e=xgetech(); xsetech(e)
+e = gca().axes_bounds;
+xsetech(e)
 subplot(122); plot2d()
 
 // check that the first plot did not become white
 
-
-
-
index 4b68d60..353dd32 100644 (file)
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-a=.7*exp(%i*%pi/6);
-[ffr,bds]=xgetech(); //preserve current context
+// Saving current context
+ax=gca(); [ffr,bds]=(ax.axes_bounds, ax.data_bounds(:)');
+//
 rect=[-1.2,-1.2*sqrt(2),1.2,1.2*sqrt(2)];
+a = .7*exp(%i*%pi/6);
 t=2*%pi*(0:179)/179;xsetech([0,0,0.5,1]);
 plot2d(sin(t)',cos(t)',[2],"012",' ',rect)
 plot2d([0 real(a)]',[0 imag(a)]',[3],"000")
index 95d7c8c..be6f9c0 100644 (file)
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-a=.7*exp(%i*%pi/6);
-[ffr,bds]=xgetech(); //preserve current context
+// Saving current context
+ax=gca(); [ffr,bds]=(ax.axes_bounds, ax.data_bounds(:)');
+//
 rect=[-1.2,-1.2*sqrt(2),1.2,1.2*sqrt(2)];
+a = .7*exp(%i*%pi/6);
 t=2*%pi*(0:179)/179;xsetech([0,0,0.5,1]);
 plot2d(sin(t)',cos(t)',[2],"012",' ',rect)
 plot2d([0 real(a)]',[0 imag(a)]',[3],"000")
index 044ec3f..7a795fa 100644 (file)
         <title>例</title>
 
         <programlisting role="example"><![CDATA[
-a=.7*exp(%i*%pi/6);
-[ffr,bds]=xgetech(); //カレントのコンテキストを保存
+//カレントのコンテキストを保存
+ax=gca(); [ffr,bds]=(ax.axes_bounds, ax.data_bounds(:)');
+//
 rect=[-1.2,-1.2*sqrt(2),1.2,1.2*sqrt(2)];
+a = .7*exp(%i*%pi/6);
 t=2*%pi*(0:179)/179;xsetech([0,0,0.5,1]);
 plot2d(sin(t)',cos(t)',[2],"012",' ',rect)
 plot2d([0 real(a)]',[0 imag(a)]',[3],"000")
index 7ff75df..25f39f4 100644 (file)
@@ -92,12 +92,11 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
 {
     // TODO: get this list from a conf file
     std::unordered_map<std::wstring, std::wstring> map;
-    // Scilab 6.0.0 => 6.1.0
-    map.emplace(L"square", L"replot");
-
-    // Scilab 6.0.0 => 6.0.1
+    // Scilab 6.0.x => 6.1.0
     map.emplace(L"nanmin", L"min");
     map.emplace(L"nanmax", L"max");
+    map.emplace(L"square", L"replot");
+    map.emplace(L"xgetech", L"gca");
 
     // Scilab 5.5.2 => 6.0.0
     map.emplace(L"fort", L"call");