summaryrefslogtreecommitdiffstats
path: root/scilab/modules/graphics
diff options
context:
space:
mode:
authorPierre MARECHAL <pierre.marechal@scilab.org>2010-04-01 15:39:39 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2010-04-01 15:39:39 +0200
commit3168c176002bcbb9431db4ae720caa114592721a (patch)
tree6036858845a8e29924106cb9833d71e38cb15545 /scilab/modules/graphics
parent61e84f25e6f62f7b7ee6e593b07b496f9a0b592d (diff)
parent3d8f7fcc07395efe2269081a92ce748592df7996 (diff)
downloadscilab-3168c176002bcbb9431db4ae720caa114592721a.zip
scilab-3168c176002bcbb9431db4ae720caa114592721a.tar.gz
Merge commit 'origin/5.2'
Conflicts: scilab/configure
Diffstat (limited to 'scilab/modules/graphics')
-rw-r--r--scilab/modules/graphics/help/en_US/arc_properties.xml9
-rw-r--r--scilab/modules/graphics/help/en_US/axes_properties.xml4
-rw-r--r--scilab/modules/graphics/help/en_US/champ_properties.xml5
-rw-r--r--scilab/modules/graphics/help/en_US/polyline_properties.xml4
-rw-r--r--scilab/modules/graphics/help/en_US/rectangle_properties.xml4
-rw-r--r--scilab/modules/graphics/help/en_US/segs_properties.xml4
-rw-r--r--scilab/modules/graphics/macros/ged.sci14
-rw-r--r--scilab/modules/graphics/tcl/ged/Arc.tcl2
-rw-r--r--scilab/modules/graphics/tcl/ged/Champ.tcl2
-rw-r--r--scilab/modules/graphics/tcl/ged/Polyline.tcl2
-rw-r--r--scilab/modules/graphics/tcl/ged/Rectangle.tcl2
-rw-r--r--scilab/modules/graphics/tcl/ged/Segs.tcl2
-rw-r--r--scilab/modules/graphics/tests/unit_tests/line_style.dia.ref19
-rw-r--r--scilab/modules/graphics/tests/unit_tests/line_style.tst24
14 files changed, 69 insertions, 28 deletions
diff --git a/scilab/modules/graphics/help/en_US/arc_properties.xml b/scilab/modules/graphics/help/en_US/arc_properties.xml
index 779f3d8..254f5fa 100644
--- a/scilab/modules/graphics/help/en_US/arc_properties.xml
+++ b/scilab/modules/graphics/help/en_US/arc_properties.xml
@@ -70,12 +70,11 @@
70 </varlistentry> 70 </varlistentry>
71 71
72 <varlistentry> 72 <varlistentry>
73 <term>line_style:</term> 73 <term>line_style: </term>
74
75 <listitem> 74 <listitem>
76 <para>The <literal>line_style</literal> property value should be an 75 <para>The <literal>line_style</literal> property value should be an integer in
77 integer in [1 6]. 1 stands for solid the other value stands for a 76 [0 8]. 0 and 1 stands for solid, the other value stands for a selection of
78 selection of dashes.</para> 77 dashes (see <link linkend="axes_properties">getlinestyle</link>).</para>
79 </listitem> 78 </listitem>
80 </varlistentry> 79 </varlistentry>
81 80
diff --git a/scilab/modules/graphics/help/en_US/axes_properties.xml b/scilab/modules/graphics/help/en_US/axes_properties.xml
index 3d408d6..93b7f01 100644
--- a/scilab/modules/graphics/help/en_US/axes_properties.xml
+++ b/scilab/modules/graphics/help/en_US/axes_properties.xml
@@ -535,9 +535,9 @@
535 <para>This field contains the default <literal>line_style</literal> 535 <para>This field contains the default <literal>line_style</literal>
536 property value for Segs, Arcs, Rectangle and Polyline objects. 536 property value for Segs, Arcs, Rectangle and Polyline objects.
537 <literal>line_style</literal> selects the type of line to be used to 537 <literal>line_style</literal> selects the type of line to be used to
538 draw lines . Its value should be an integer in [0 6]. 0 and 1 538 draw lines . Its value should be an integer in [0 8]. 0 and 1
539 stand for solid, the other values stand for a selection of dashes 539 stand for solid, the other values stand for a selection of dashes
540 (see <link linkend="getlinestyle">getlinestyle</link>).</para> 540 (dash, dash dot, longdash dot, bigdash dot, bigdash longdash, dot, double dot).</para>
541 </listitem> 541 </listitem>
542 </varlistentry> 542 </varlistentry>
543 <varlistentry> 543 <varlistentry>
diff --git a/scilab/modules/graphics/help/en_US/champ_properties.xml b/scilab/modules/graphics/help/en_US/champ_properties.xml
index db5d454..3e72858 100644
--- a/scilab/modules/graphics/help/en_US/champ_properties.xml
+++ b/scilab/modules/graphics/help/en_US/champ_properties.xml
@@ -57,9 +57,8 @@
57 <term>line_style: </term> 57 <term>line_style: </term>
58 <listitem> 58 <listitem>
59 <para>The <literal>line_style</literal> property value should be an integer in 59 <para>The <literal>line_style</literal> property value should be an integer in
60 [0 9]. 0 stands for solid the other value stands for a selection of 60 [0 8]. 0 and 1 stands for solid, the other value stands for a selection of
61 dashes. This property applies to all lines used to draw the vector 61 dashes (see <link linkend="axes_properties">getlinestyle</link>).</para>
62 field.</para>
63 </listitem> 62 </listitem>
64 </varlistentry> 63 </varlistentry>
65 <varlistentry> 64 <varlistentry>
diff --git a/scilab/modules/graphics/help/en_US/polyline_properties.xml b/scilab/modules/graphics/help/en_US/polyline_properties.xml
index 4c1786d..22de97b 100644
--- a/scilab/modules/graphics/help/en_US/polyline_properties.xml
+++ b/scilab/modules/graphics/help/en_US/polyline_properties.xml
@@ -86,8 +86,8 @@
86 <term>line_style: </term> 86 <term>line_style: </term>
87 <listitem> 87 <listitem>
88 <para>The <literal>line_style</literal> property value should be an integer in 88 <para>The <literal>line_style</literal> property value should be an integer in
89 [1 6]. 1 stands for solid the other value stands for a selection of 89 [0 8]. 0 and 1 stands for solid, the other value stands for a selection of
90 dashes (see <link linkend="getlinestyle">getlinestyle</link>).</para> 90 dashes (see <link linkend="axes_properties">getlinestyle</link>).</para>
91 </listitem> 91 </listitem>
92 </varlistentry> 92 </varlistentry>
93 <varlistentry> 93 <varlistentry>
diff --git a/scilab/modules/graphics/help/en_US/rectangle_properties.xml b/scilab/modules/graphics/help/en_US/rectangle_properties.xml
index 6612640..2877cfb 100644
--- a/scilab/modules/graphics/help/en_US/rectangle_properties.xml
+++ b/scilab/modules/graphics/help/en_US/rectangle_properties.xml
@@ -132,8 +132,8 @@
132 <term>line_style: </term> 132 <term>line_style: </term>
133 <listitem> 133 <listitem>
134 <para>The <literal>line_style</literal> property value should be an integer in 134 <para>The <literal>line_style</literal> property value should be an integer in
135 [1 6]. 1 stands for solid the other value stands for a selection of 135 [0 8]. 0 and 1 stands for solid, the other value stands for a selection of
136 dashes.</para> 136 dashes (see <link linkend="axes_properties">getlinestyle</link>).</para>
137 </listitem> 137 </listitem>
138 </varlistentry> 138 </varlistentry>
139 <varlistentry> 139 <varlistentry>
diff --git a/scilab/modules/graphics/help/en_US/segs_properties.xml b/scilab/modules/graphics/help/en_US/segs_properties.xml
index 56208d2..6eb1588 100644
--- a/scilab/modules/graphics/help/en_US/segs_properties.xml
+++ b/scilab/modules/graphics/help/en_US/segs_properties.xml
@@ -73,8 +73,8 @@
73 <term>line_style: </term> 73 <term>line_style: </term>
74 <listitem> 74 <listitem>
75 <para>The <literal>line_style</literal> property value should be an integer in 75 <para>The <literal>line_style</literal> property value should be an integer in
76 [0 6]. 0 stands for solid the other value stands for a selection of 76 [0 8]. 0 and 1 stands for solid, the other value stands for a selection of
77 dashes. This property applies to all segments.</para> 77 dashes (see <link linkend="axes_properties">getlinestyle</link>).</para>
78 </listitem> 78 </listitem>
79 </varlistentry> 79 </varlistentry>
80 <varlistentry> 80 <varlistentry>
diff --git a/scilab/modules/graphics/macros/ged.sci b/scilab/modules/graphics/macros/ged.sci
index 1c2c8b3..231d0fc 100644
--- a/scilab/modules/graphics/macros/ged.sci
+++ b/scilab/modules/graphics/macros/ged.sci
@@ -432,7 +432,7 @@ function ged_axes(h)
432 TCL_SetVar("Rmargins",string(h.margins(2))); 432 TCL_SetVar("Rmargins",string(h.margins(2)));
433 TCL_SetVar("Tmargins",string(h.margins(3))); 433 TCL_SetVar("Tmargins",string(h.margins(3)));
434 TCL_SetVar("Bmargins",string(h.margins(4))); 434 TCL_SetVar("Bmargins",string(h.margins(4)));
435 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 435 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
436 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 436 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
437 if (h.clip_box==[]) 437 if (h.clip_box==[])
438 TCL_SetVar("old_Xclipbox","") 438 TCL_SetVar("old_Xclipbox","")
@@ -621,7 +621,7 @@ function ged_rectangle(h)
621 TCL_SetVar("curback",string(h.background)) 621 TCL_SetVar("curback",string(h.background))
622 TCL_SetVar("curthick",string(h.thickness)) 622 TCL_SetVar("curthick",string(h.thickness))
623 TCL_SetVar("curvis",h.visible) 623 TCL_SetVar("curvis",h.visible)
624 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 624 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
625 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 625 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
626 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" .. 626 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" ..
627 "diamond" "triangle up" "triangle down" "diamond plus" "circle" .. 627 "diamond" "triangle up" "triangle down" "diamond plus" "circle" ..
@@ -692,7 +692,7 @@ function ged_polyline(h)
692 692
693 ged_polylinestylearray=["interpolated" "staircase" "barplot" "arrowed" "filled" "bar"]; 693 ged_polylinestylearray=["interpolated" "staircase" "barplot" "arrowed" "filled" "bar"];
694 TCL_SetVar("curpolylinestyle",ged_polylinestylearray(max(h.polyline_style,1))) 694 TCL_SetVar("curpolylinestyle",ged_polylinestylearray(max(h.polyline_style,1)))
695 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 695 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
696 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 696 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
697 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" .. 697 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" ..
698 "diamond" "triangle up" "triangle down" "diamond plus" "circle" .. 698 "diamond" "triangle up" "triangle down" "diamond plus" "circle" ..
@@ -945,7 +945,7 @@ function ged_arc(h)
945 TCL_SetVar("Hclipbox",string(h.clip_box(4))) 945 TCL_SetVar("Hclipbox",string(h.clip_box(4)))
946 end 946 end
947 TCL_SetVar("curclipstate",h.clip_state); 947 TCL_SetVar("curclipstate",h.clip_state);
948 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 948 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
949 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 949 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
950 TCL_SetVar("nbcol",string(size(h.data,2))) 950 TCL_SetVar("nbcol",string(size(h.data,2)))
951 for i=1:size(h.data,2) 951 for i=1:size(h.data,2)
@@ -995,7 +995,7 @@ function ged_segs(h)
995 TCL_SetVar("ncolors",string(size(f.color_map,1))) 995 TCL_SetVar("ncolors",string(size(f.color_map,1)))
996 TCL_SetVar("curarrowsize",string(h.arrow_size)) 996 TCL_SetVar("curarrowsize",string(h.arrow_size))
997 TCL_SetVar("curthick",string(h.thickness)) 997 TCL_SetVar("curthick",string(h.thickness))
998 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 998 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
999 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 999 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
1000 1000
1001 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" .. 1001 ged_markstylearray=["dot" "plus" "cross" "star" "filled diamond" ..
@@ -1053,7 +1053,7 @@ function ged_champ(h)
1053 TCL_SetVar("ncolors",string(size(f.color_map,1))) 1053 TCL_SetVar("ncolors",string(size(f.color_map,1)))
1054 TCL_SetVar("curarrowsize",string(h.arrow_size)) 1054 TCL_SetVar("curarrowsize",string(h.arrow_size))
1055 TCL_SetVar("curthick",string(h.thickness)) 1055 TCL_SetVar("curthick",string(h.thickness))
1056 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"]; 1056 ged_linestylearray=["solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"];
1057 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1))) 1057 TCL_SetVar("curlinestyle",ged_linestylearray(max(h.line_style,1)))
1058 1058
1059 d="["+strcat(string(size(h.data.x)),'x')+" double array]" 1059 d="["+strcat(string(size(h.data.x)),'x')+" double array]"
@@ -1608,7 +1608,7 @@ endfunction
1608function setLineStyle(sty) 1608function setLineStyle(sty)
1609 global ged_handle; h=ged_handle 1609 global ged_handle; h=ged_handle
1610 h.line_style=find(sty==[ "solid" "dash" "dash dot" "longdash dot" .. 1610 h.line_style=find(sty==[ "solid" "dash" "dash dot" "longdash dot" ..
1611 "bigdash dot" "bigdash longdash"]) 1611 "bigdash dot" "bigdash longdash" "dot" "double dot"])
1612 1612
1613endfunction 1613endfunction
1614function setMarkStyle(sty) 1614function setMarkStyle(sty)
diff --git a/scilab/modules/graphics/tcl/ged/Arc.tcl b/scilab/modules/graphics/tcl/ged/Arc.tcl
index 60f518b..459c1b9 100644
--- a/scilab/modules/graphics/tcl/ged/Arc.tcl
+++ b/scilab/modules/graphics/tcl/ged/Arc.tcl
@@ -244,7 +244,7 @@ combobox $w.frame.style \
244 -textvariable curlinestyle \ 244 -textvariable curlinestyle \
245 -editable false \ 245 -editable false \
246 -command [list SelectLineStyle ] -font $gedFont 246 -command [list SelectLineStyle ] -font $gedFont
247eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"] 247eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"]
248 248
249#Add thickness here 249#Add thickness here
250combobox $w.frame.thickness \ 250combobox $w.frame.thickness \
diff --git a/scilab/modules/graphics/tcl/ged/Champ.tcl b/scilab/modules/graphics/tcl/ged/Champ.tcl
index 57df2d7..3b4e3df 100644
--- a/scilab/modules/graphics/tcl/ged/Champ.tcl
+++ b/scilab/modules/graphics/tcl/ged/Champ.tcl
@@ -222,7 +222,7 @@ combobox $w.frame.style \
222 -textvariable curlinestyle \ 222 -textvariable curlinestyle \
223 -editable false \ 223 -editable false \
224 -command [list SelectLineStyle ] -font $gedFont 224 -command [list SelectLineStyle ] -font $gedFont
225eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"] 225eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"]
226pack $w.frame.stylelabel -in $w.frame.linest -side left 226pack $w.frame.stylelabel -in $w.frame.linest -side left
227pack $w.frame.style -in $w.frame.linest -expand 1 -fill x -pady 0 -padx $mediumPad 227pack $w.frame.style -in $w.frame.linest -expand 1 -fill x -pady 0 -padx $mediumPad
228 228
diff --git a/scilab/modules/graphics/tcl/ged/Polyline.tcl b/scilab/modules/graphics/tcl/ged/Polyline.tcl
index 063d5a0..40a7376 100644
--- a/scilab/modules/graphics/tcl/ged/Polyline.tcl
+++ b/scilab/modules/graphics/tcl/ged/Polyline.tcl
@@ -299,7 +299,7 @@ combobox $w.frame.style \
299 -textvariable curlinestyle \ 299 -textvariable curlinestyle \
300 -editable false \ 300 -editable false \
301 -command [list SelectLineStyle ] -font $gedFont 301 -command [list SelectLineStyle ] -font $gedFont
302eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"] 302eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"]
303 303
304#Arrow size factor 304#Arrow size factor
305frame $w.frame.arrowsize -borderwidth 0 305frame $w.frame.arrowsize -borderwidth 0
diff --git a/scilab/modules/graphics/tcl/ged/Rectangle.tcl b/scilab/modules/graphics/tcl/ged/Rectangle.tcl
index 2867906..7dd187b 100644
--- a/scilab/modules/graphics/tcl/ged/Rectangle.tcl
+++ b/scilab/modules/graphics/tcl/ged/Rectangle.tcl
@@ -239,7 +239,7 @@ combobox $w.frame.style \
239 -textvariable curlinestyle \ 239 -textvariable curlinestyle \
240 -editable false \ 240 -editable false \
241 -command [list SelectLineStyle ] -font $gedFont 241 -command [list SelectLineStyle ] -font $gedFont
242eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"] 242eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"]
243 243
244#Add thickness here 244#Add thickness here
245combobox $w.frame.thickness \ 245combobox $w.frame.thickness \
diff --git a/scilab/modules/graphics/tcl/ged/Segs.tcl b/scilab/modules/graphics/tcl/ged/Segs.tcl
index 3524308..050445a 100644
--- a/scilab/modules/graphics/tcl/ged/Segs.tcl
+++ b/scilab/modules/graphics/tcl/ged/Segs.tcl
@@ -227,7 +227,7 @@ combobox $w.frame.style \
227 -textvariable curlinestyle \ 227 -textvariable curlinestyle \
228 -editable false \ 228 -editable false \
229 -command [list SelectLineStyle ] -font $gedFont 229 -command [list SelectLineStyle ] -font $gedFont
230eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash"] 230eval $w.frame.style list insert end [list "solid" "dash" "dash dot" "longdash dot" "bigdash dot" "bigdash longdash" "dot" "double dot"]
231 231
232#Add thickness here 232#Add thickness here
233combobox $w.frame.thickness \ 233combobox $w.frame.thickness \
diff --git a/scilab/modules/graphics/tests/unit_tests/line_style.dia.ref b/scilab/modules/graphics/tests/unit_tests/line_style.dia.ref
new file mode 100644
index 0000000..1b43191
--- /dev/null
+++ b/scilab/modules/graphics/tests/unit_tests/line_style.dia.ref
@@ -0,0 +1,19 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - pierre.lando@scilab.org
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- TEST WITH GRAPHIC -->
8//
9//
10// <-- Short Description -->
11// Check line_style correctness
12// Try this :
13for i = [0:9] do
14 plot([i,i]);
15 e=gce();
16 e=e.children();
17 e.line_style = i;
18end
19// check that you have bottom to up : dash, dash dot, longdash dot, bigdash dot, bigdash longdash, dot, double dot.
diff --git a/scilab/modules/graphics/tests/unit_tests/line_style.tst b/scilab/modules/graphics/tests/unit_tests/line_style.tst
new file mode 100644
index 0000000..b69a03e
--- /dev/null
+++ b/scilab/modules/graphics/tests/unit_tests/line_style.tst
@@ -0,0 +1,24 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - pierre.lando@scilab.org
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- TEST WITH GRAPHIC -->
9//
10//
11
12// <-- Short Description -->
13// Check line_style correctness
14
15// Try this :
16
17for i = [0:9] do
18 plot([i,i]);
19 e=gce();
20 e=e.children();
21 e.line_style = i;
22end
23
24// check that you have bottom to up : dash, dash dot, longdash dot, bigdash dot, bigdash longdash, dot, double dot.