* Bug #14036 fixed - tag and user_data properties were not displayed and not document... 33/17033/2
Charlotte HECQUET [Thu, 13 Aug 2015 09:16:12 +0000 (11:16 +0200)]
Change-Id: Ie038ddea65aa87b81b28cf86b32cf158ff43796b

scilab/CHANGES_6.0.X
scilab/modules/graphics/help/en_US/lighting/light_properties.xml
scilab/modules/graphics/help/ja_JP/lighting/light_properties.xml
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/tests/nonreg_tests/bug_14036.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/nonreg_tests/bug_14036.tst [new file with mode: 0644]

index 61515c8..9ef28f4 100644 (file)
@@ -19,6 +19,8 @@ Scilab Bug Fixes
 
 * Bug #14025 fixed - head_comments did not take into account compiled functions.
 
+* Bug #14036 fixed - tag and user_data properties were not displayed and not documented for light entity.
+
 * Bug #14049 fixed - genlib hangs if an unexpected endfunction occurs.
 
 
index e64fa69..25fed88 100644 (file)
                     </para>
                 </listitem>
             </varlistentry>
+            <varlistentry>
+                <term>user_data: </term>
+                <listitem>
+                    <para>This field can be use to store any scilab variable and to retreive it.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>tag: </term>
+                <listitem>
+                    <para>This field can be use to store a character string generally used to identify the light entity. It allows to give it a "name". Mainly used in conjontion with findobj() and get()/set() functions.</para>
+                </listitem>
+            </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
index 87f5f07..b718639 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
-
-
-
 <!--
-
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
  * Copyright (C) Pedro SOUZA
-
  *
-
  * 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.1-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" xmlns:scilab="http://www.scilab.org"  xml:lang="ja" scilab:needs-examples="no" xml:id="light_properties">
-    
-    
-    
     <refnamediv>
-        
-        
-        
         <refname>light properties</refname>
-        
-        
-        
         <refpurpose>光源の概要</refpurpose>
-        
-        
-        
     </refnamediv>
-    
-    
-    
     <refsection>
-        
-        
-        
         <title>説明</title>
-        
-        
-        
         <para>
-            
-            
-            
             lightエンティティは外観照明を変更するためのプロパティを有します.
-            
-            
-            
             照明は軸内では不可視ですが,曲面の外観に影響を与えます.
-            
-            
-            
             (照明の詳細については<link linkend="lighting">照明</link>を参照ください).
-            
-            
-            
         </para>
-        
-        
-        
         <para>
-            
-            
-            
             光源は
-            
-            
-            
             <link linkend="light">light</link> 関数により作成でき,
-            
-            
-            
             <link linkend="delete">delete</link> 関数により削除されます.
-            
-            
-            
         </para>
-        
-        
-        
         <scilab:image>
-            
-            
-            
             plot3d();
-            
-            
-            
             l = light();
-            
-            
-            
             s = gce();
-            
-            
-            
             s.diffuse_color = [0 0 0.8];
-            
-            
-            
             s.ambient_color = [0 0 1];
-            
-            
-            
             s.use_color_material = "off";
-            
-            
-            
         </scilab:image>
-        
-        
-        
     </refsection>
-    
-    
-    
     <refsection>
-        
-        
-        
         <title>lightプロパティのリスト</title>
-        
-        
-        
         <variablelist>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>visible: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは光源の有効(<literal>"on"</literal>)または
-                        
-                        
-                        
                         無効(<literal>"off"</literal>)を定義します.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>light_type: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは使用される光の型を定義します.
-                        
-                        
-                        
                         以下の2種類の光を利用できます:
-                        
-                        
-                        
                         <literal>"directional"</literal> および <literal>"point"</literal>.
-                        
-                        
-                        
                         方向性(directional)光源は,曲面から無限遠に位置する光源で,平行線となります.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         点(point)光源は,全ての方向に放射する空間の点として
-                        
-                        
-                        
                         定義されます.
-                        
-                        
-                        
                         デフォルト値は <literal>"point"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>direction: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは方向性光源の光線方向を定義します.
-                        
-                        
-                        
                         方向は,原点からのベクトルを表す
-                        
-                        
-                        
                         3要素ベクトル<literal>"[x, y, z]"</literal>により変更できます.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         デフォルト値は <literal>"[0 0 1]"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>position: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは,点光源の光源位置を定義します.
-                        
-                        
-                        
                         位置は3要素ベクトル<literal>"[x, y, z]"</literal>により変更できます.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         デフォルト値は<literal>"[0 0 1]"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>ambient_color: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは光源のアンビエント色を定義します.
-                        
-                        
-                        
                         この色は3要素ベクトル<literal>"[red, green, blue]"</literal>
-                        
-                        
-                        
                         (各要素の範囲は[0, 1])により定義されます.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         デフォルト値は<literal>"[0.1 0.1 0.1]"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>diffuse_color: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは光源の拡散色を定義します.
-                        
-                        
-                        
                         この色は3要素ベクトル<literal>"[red, green, blue]"</literal>
-                        
-                        
-                        
                         (各要素の範囲は[0, 1])により定義されます.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         デフォルト値は<literal>"[1 1 1]"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
             <varlistentry>
-                
-                
-                
                 <term>specular_color: </term>
-                
-                
-                
                 <listitem>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         このフィールドは光源の鏡面反射色を定義します.
-                        
-                        
-                        
                         この色は3要素ベクトル<literal>"[red, green, blue]"</literal>
-                        
-                        
-                        
                         (各要素の範囲は[0, 1])により定義されます.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                     <para>
-                        
-                        
-                        
                         デフォルト値は <literal>"[1 1 1]"</literal>です.
-                        
-                        
-                        
                     </para>
-                    
-                    
-                    
                 </listitem>
-                
-                
-                
             </varlistentry>
-            
-            
-            
+            <varlistentry>
+                <term>user_data: </term>
+                <listitem>
+                    <para>This field can be use to store any scilab variable and to retreive it.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>tag: </term>
+                <listitem>
+                    <para>This field can be use to store a character string generally used to identify the light entity. It allows to give it a "name". Mainly used in conjontion with findobj() and get()/set() functions.</para>
+                </listitem>
+            </varlistentry>
         </variablelist>
-        
-        
-        
     </refsection>
-    
-    
-    
     <refsection>
-        
-        
-        
         <title>例</title>
-        
-        
-        
         <programlisting role="example"><![CDATA[
-
         // 点光源
-
         plot3d;l=light();s=gce();
-
         for i=0:1000
-
             sleep(5);
-
             x = 2*cos(i*%pi/180);
-
             y = 2*sin(i*%pi/180);
-
             z = 2;
-
             l.position = [x y z];
-
         end
 
-
-
         // 方向性光源に光源を変更
-
         l.light_type = "directional";
-
         l.direction = [1 0 1];
-
         l.ambient_color = [0.1 0.1 0.1];
-
         s.diffuse_color = [0.4 0.4 0.4];
-
         s.use_color_material = "off";
-
         s.color_flag = 0;
-
         s.thickness = 0;
-
         s.hiddencolor = -1;
-
         s.specular_color = [0.6 0.6 0.6];
-
         sleep(5000);
 
-
-
         l2 = light(ambient_color=[0 0 0], diffuse_color = [0.8 0.8 1], type="point", position=[0 3 4]);
-
         sleep(5000);
-
         delete(l);
-
         l2.specular_color = [1 0.6 0];
-
         ]]></programlisting>
-        
-        
-        
     </refsection>
-    
-    
-    
     <refsection role="see also">
-        
-        
-        
         <title>参照</title>
-        
-        
-        
         <simplelist type="inline">
-            
-            
-            
             <member>
-                
-                
-                
                 <link linkend="lighting">照明</link>
-                
-                
-                
             </member>
-            
-            
-            
             <member>
-                
-                
-                
                 <link linkend="light">light</link>
-                
-                
-                
             </member>
-            
-            
-            
             <member>
-                
-                
-                
                 <link linkend="delete">delete</link>
-                
-                
-                
             </member>
-            
-            
-            
         </simplelist>
-        
-        
-        
     </refsection>
-    
-    
-    
 </refentry>
-
-
-
index afb3b86..1cbe3f2 100755 (executable)
@@ -1104,6 +1104,8 @@ function %h_p(h)
             "ambient_color = "+sci2exp(h.ambient_color)
             "diffuse_color = "+sci2exp(h.diffuse_color)
             "specular_color= "+sci2exp(h.specular_color)
+            "user_data = "+fmtuser_data(h.userdata)
+            "tag = "+sci2exp(h.tag)
             ]
         end
     end
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_14036.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_14036.dia.ref
new file mode 100644 (file)
index 0000000..dd1d647
--- /dev/null
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Cedric Delamarre
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 14036 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14036
+//
+// <-- Short Description -->
+// userdata and tag are hidden light properties
+l = light();
+l.userdata = "Source 1";
+l.tag = "LS1";
+l
+l  = 
+Handle of type "Light" with properties:
+=======================================
+parent: Axes
+visible = "on"
+light_type = "point"
+position = [0,0,1]
+direction = [0,0,1]
+ambient_color = [0.1,0.1,0.1]
+diffuse_color = [1,1,1]
+specular_color= [1,1,1]
+user_data = "Source 1"
+tag = "LS1"
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_14036.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_14036.tst
new file mode 100644 (file)
index 0000000..163725b
--- /dev/null
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Cedric Delamarre
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+// <-- Non-regression test for bug 14036 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14036
+//
+// <-- Short Description -->
+// userdata and tag are hidden light properties
+
+l = light();
+l.userdata = "Source 1";
+l.tag = "LS1";
+
+l
\ No newline at end of file