1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/bugs/vis/bug21091_9
isk 29e2c6d247 0022785: Draw Harness - add possibility to remove a text drawn by the command vdrawtext
AIS_TextLabel - new public class to display simple text labels (based on MyTextClass private class from Draw Harness).
ViewerTest::Display() - add more reliable replacement for VDisplayAISObject() with no viewer update flag.

vdrawtext command redesign:
- Use new AIS_TextLabel class instead of private MyTextClass.
- Take object name and allow to clear labels from the Viewer.
- Use parameter name + parameter value syntax instead of strict list of mandatory arguments.
- Use [0; 1] range for colors and accept names.
- Drop redundant argument "isMultiByte".
- Support argument -noupdate to skip Viewer update.

Update test cases to new syntax of vdrawtext.
2015-05-06 15:06:47 +03:00

67 lines
2.4 KiB
Plaintext
Executable File

puts "============"
puts "OCC21091"
puts "OCC21450"
puts "============"
puts ""
#vexport
#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
#Testing export to PGF format
vinit
vtrihedron trihedron
vpoint p1 -300 -300 -300
vdrawtext 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
vpoint p2 -300 -300 -100
vdrawtext 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
vpoint p3 -100 -100 -300
vdrawtext 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
vpoint p4 -100 -100 -100
vdrawtext 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
vpoint p5 -300 -100 -300
vdrawtext 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
vpoint p6 -100 -300 -300
vdrawtext 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
vpoint p7 -300 -100 -100
vdrawtext 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
vpoint p8 -100 -300 -100
vdrawtext 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
vaxis ax1 100 100 100 100 100 0
box a 110 110 110 200 200 200
vdisplay a
file delete -force ${imagedir}/${test_image}.pgf
set aFile ${imagedir}/${test_image}.pgf
vexport ${aFile} PGF
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
set refsize 20438
} else {
set refsize 20810
}
if { [file exists ${aFile}] } {
puts "Export to PGF file was done"
set filesize [file size ${aFile}]
if { $filesize != $refsize } {
puts "Error: Export to PGF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
puts "Error: Compare content of resulting PGF file with reference."
puts "Error: Update refsize if it's necessary."
}
} else {
puts "Faulty : Export to PGF file was not done"
}
set only_screen 1