0022785: Draw Harness - add possibility to remove a text drawn by the command vdrawtext
[occt.git] / tests / bugs / vis / bug21091_8
CommitLineData
a8676008 1puts "============"
2puts "OCC21091"
3puts "OCC21450"
4puts "============"
5puts ""
6#vexport
7#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
8#Testing export to SVG format
9
10vinit
a8676008 11vtrihedron trihedron
12
13vpoint p1 -300 -300 -300
29e2c6d2 14vdrawtext OC0 OpenCascade -pos -300 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
15
a8676008 16vpoint p2 -300 -300 -100
29e2c6d2 17vdrawtext OC1 OpenCascade -pos -300 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
18
a8676008 19vpoint p3 -100 -100 -300
29e2c6d2 20vdrawtext OC2 OpenCascade -pos -100 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
21
a8676008 22vpoint p4 -100 -100 -100
29e2c6d2 23vdrawtext OC3 OpenCascade -pos -100 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
a8676008 24
25
26vpoint p5 -300 -100 -300
29e2c6d2 27vdrawtext OC4 OpenCascade -pos -300 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
28
a8676008 29vpoint p6 -100 -300 -300
29e2c6d2 30vdrawtext OC5 OpenCascade -pos -100 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
31
a8676008 32vpoint p7 -300 -100 -100
29e2c6d2 33vdrawtext OC6 OpenCascade -pos -300 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
34
a8676008 35vpoint p8 -100 -300 -100
29e2c6d2 36vdrawtext OC7 OpenCascade -pos -100 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
a8676008 37
38vaxis ax1 100 100 100 100 100 0
39
40box a 110 110 110 200 200 200
41vdisplay a
42
9aa684ed 43file delete -force ${imagedir}/${test_image}.svg
44set aFile ${imagedir}/${test_image}.svg
a8676008 45
46vexport ${aFile} SVG
47
9aa684ed 48if { [string compare $tcl_platform(platform) "windows"] != 0 } {
49 set refsize 14191
50} else {
51 set refsize 14075
52}
53
a8676008 54if { [file exists ${aFile}] } {
55 puts "Export to SVG file was done"
56 set filesize [file size ${aFile}]
9aa684ed 57 if { $filesize != $refsize } {
58 puts "Error: Export to SVG file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
59 puts "Error: Compare content of resulting SVG file with reference."
60 puts "Error: Update refsize if it's necessary."
61 }
62} else {
63 puts "Faulty : Export to SVG file was not done"
64}
65
29e2c6d2 66set only_screen 1