4af098ba |
1 | puts "============" |
2 | puts "OCC25723" |
3 | puts "Calculate the center of rotation taking into account active selection" |
4 | puts "============" |
5 | puts "" |
6 | |
7 | set x_sel_coord 220 |
8 | set y_sel_coord 50 |
9 | |
10 | set x_mouse_start_coord 100 |
11 | set y_mouse_start_coord 100 |
12 | |
13 | set x_mouse_move_coord 300 |
14 | set y_mouse_move_coord 300 |
15 | |
16 | set x_check_coord 220 |
17 | set y_check_coord 50 |
18 | |
19 | box b1 0 0 0 10 10 10 |
20 | box b2 0 0 20 10 10 10 |
21 | box b3 0 0 -20 10 10 10 |
22 | box b4 0 0 40 10 10 10 |
23 | |
24 | vinit View1 |
25 | vclear |
26 | vaxo |
27 | vsetdispmode 1 |
28 | |
29 | # turn on solid selection |
30 | vselmode 6 1 |
31 | vdisplay b1 b2 b3 b4 |
32 | vfit |
33 | |
34 | # select one (red) solid |
35 | vselect ${x_sel_coord} ${y_sel_coord} |
36 | |
37 | # start rotation |
38 | vrotate -mouseStart ${x_mouse_start_coord} ${y_mouse_start_coord} -mouseMove ${x_mouse_move_coord} ${y_mouse_move_coord} |
39 | |
40 | # unselect |
41 | vselect 0 0 |
42 | |
43 | # check color |
ba00aab7 |
44 | if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GOLDENROD3"} { puts "Error : Rotation is not correct" } |
4af098ba |
45 | |
ba00aab7 |
46 | vdump ${imagedir}/${test_image}.png |