1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-01 10:26:12 +03:00
occt/tests/bugs/vis/bug23652
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

33 lines
1.0 KiB
Plaintext
Executable File

puts "========"
puts "OCC23652"
puts "========"
###############################################################################
# Non zoomable text with alignment slides away when zooming view
###############################################################################
vinit
vtrihedron tri
vdrawtext text0 Default -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular
vdrawtext text1 Right_Align -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign right -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular
set scale 3.1783114563761763
set proj_X 0.57735025882720947
set proj_Y -0.57735025882720947
set proj_Z 0.57735025882720947
set up_X -0.40824827551841736
set up_Y 0.40824827551841736
set up_Z 0.81649655103683472
set at_X 0
set at_Y 0
set at_Z 0
vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
set x_coord 210
set y_coord 204
checkcolor $x_coord $y_coord 0.6 0.6 0.6
set only_screen 1