1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
// <-- Non-regression test for bug 1902 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1902
//
// <-- Short Description -->
// in drawlater mode the bounding box of strings may be wrong
// Copyright INRIA
// Scilab Project - Jean-Baptiste Silvy
// Copyright INRIA 2006
// Date : October 25 2006
// draw later part
drawlater() ;
xstring(0,0,['toto','titi';"tatapjp","iiih"]) ;
e = gce() ;
box11 = stringbox(e)
a = gca() ;
a.data_bounds = [-2,-2;7,7] ;
box21 = stringbox(e)
a.view = '3d' ;
box31 = stringbox(e)
a.data_bounds = [0,-1,3;6,7,8] ;
box41 = stringbox(e)
drawnow() ;
clf() ;
// same as first part but wthout drawlater
xstring(0,0,['toto','titi';"tatapjp","iiih"]) ;
e = gce() ;
box12 = stringbox(e)
a = gca() ;
a.data_bounds = [-2,-2;7,7] ;
box22 = stringbox(e)
a.view = '3d' ;
box32 = stringbox(e)
a.data_bounds = [0,-1,3;6,7,8] ;
box42 = stringbox(e)
// bounding box should be the same either we are in drawlater or not.
if ( norm( box11 - box12 ) < 0.1 ..
& norm( box21 - box22 ) < 0.1 ..
& norm( box31 - box32 ) < 0.1 ..
& norm( box41 - box42 ) < 0.1 ) then
affich_result(%T,1902) ;
else
affich_result(%F,1902) ;
end
|