mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-26 10:19:45 +03:00
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.
30 lines
789 B
Plaintext
Executable File
30 lines
789 B
Plaintext
Executable File
puts "============"
|
|
puts "OCC24555"
|
|
puts "============"
|
|
puts ""
|
|
#######################################################################
|
|
# Visualization - the same text is rendered with shift at second time
|
|
#######################################################################
|
|
|
|
vinit
|
|
vclear
|
|
vaxo
|
|
vdrawtext text0 "This program" -pos 0 0 0 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font Arial
|
|
|
|
vdrawtext text1 "This program" -pos 0 0 0 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font Arial
|
|
|
|
set x 346
|
|
set y 190
|
|
|
|
set R 0
|
|
set G 0.9843137264251709
|
|
set B 0
|
|
|
|
if {"[vreadpixel $x $y rgb]" == "$R $G $B" } {
|
|
puts "Error : color is bad"
|
|
} else {
|
|
puts "OK : color is good"
|
|
}
|
|
|
|
set only_screen 1
|