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

26 lines
1.3 KiB
Plaintext

puts "================"
puts "OCC25121"
puts "================"
puts ""
#######################################################################################
# Visualization, OpenGl_Text - correct scaling factor for fixed-size text at 3D point
#######################################################################################
vinit
box b -5 -5 0 10 10 1
vdisplay -noupdate b
vtop
vfit
vdrawtext 000_3D "000 3D" -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font Courier
vdrawtext 001_3D "001 3D" -pos 0.0 1.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font Courier
vdrawtext 101_3D "101 3D" -pos 0.0 2.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font Courier
vdrawtext 110_3D "110 3D" -pos 0.0 3.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font Courier
voverlaytext "000 2D" 100 200 16 Courier 255 255 255 normal 0 0 255
voverlaytext "001 2D" 100 250 16 Courier 255 255 255 normal 0 0 255
voverlaytext "101 2D" 100 300 16 Courier 255 255 255 normal 0 0 255
voverlaytext "110 2D" 100 350 16 Courier 255 255 255 normal 0 0 255
set only_screen 1