0024387: Tests - use system-independent fonts in test cases
[occt.git] / tests / bugs / vis / bug24412_2
CommitLineData
af203d54 1puts "============"
2puts "CR24412"
3puts "============"
4puts ""
5#######################################################################
6# TKV3d, Dimensions - Possibility to customize text position was lost
7# Test position setting for angular dimension
8#######################################################################
9pload ALL
10
6fb1a930 11vfont add [locate_data_file DejaVuSans.ttf] SansFont
12
af203d54 13set anImage1 $imagedir/${casename}_1.png
14set anImage2 $imagedir/${casename}_2.png
15
16vinit Viewer1/View1
17vpoint ang_p1 0 0 30
18vpoint ang_p2 30 0 0
19vpoint ang_p3 60 0 30
6fb1a930 20vdimension ang -angle -shapes ang_p1 ang_p2 ang_p3 -font SansFont
af203d54 21vmovedim ang 5 0 5
22vfit
23
24# Check that text position was changed and the text is not aligned
25set x_coord 60
26set y_coord 189
27checkcolor $x_coord $y_coord 0.46 0.9 0
28if { $stat != 1 } {
29 puts "Error : Text position of dimension is incorrect."
30}
31
32vdump $anImage1
33
34
35# Update dimension parameters and set automatic text positioning
0499eb06 36vdimparam ang -flyout -5
af203d54 37vfit
38
39# Check that text position was changed according to flyout
40set x_coord 206
41set y_coord 312
42checkcolor $x_coord $y_coord 0.46 0.9 0
43if { $stat != 1 } {
44 puts "Error : Text position of dimension after layout changing is incorrect."
45}
46
47vdump $anImage2