mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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.
92 lines
6.3 KiB
Plaintext
Executable File
92 lines
6.3 KiB
Plaintext
Executable File
puts "============"
|
|
puts "OCC21091"
|
|
puts "OCC21450"
|
|
puts "============"
|
|
puts ""
|
|
#vdrawtext: vdrawtext name text [-pos X Y Z] [-color R G B] [-align hor_align ver_align] [-angle angle] [-zoom zoomable]
|
|
# [-height height] [-aspect aspect] [-font font] [-mb isMultiByte]
|
|
#------------------------------------------------------
|
|
# X\Y\Z - Position Of Text
|
|
#------------------------------------------------------
|
|
# R\G\B - Color Of Text
|
|
#------------------------------------------------------
|
|
# hor_align 0 to 3
|
|
# HorizontalTextAlignment is HTA_LEFT 0
|
|
# HTA_CENTER 1
|
|
# HTA_RIGHT 2
|
|
#
|
|
# ver_align 0 to 4
|
|
# VerticalTextAlignment is VTA_BOTTOM 0
|
|
# VTA_CENTER 1
|
|
# VTA_TOP 2
|
|
#------------------------------------------------------
|
|
# angle - angle turn of text. this variable in degrees
|
|
#------------------------------------------------------
|
|
# zoomable - if this variable "0" text not zoomable
|
|
# if this variable "1" text zoomable as object in DrawCommands
|
|
#------------------------------------------------------
|
|
# height - Font Height
|
|
#------------------------------------------------------
|
|
# Aspect - Aspect Font 0 to 4
|
|
# If in list of textfont, not find font with necessary aspect, will be used default font "Courier" with OSD_FA_Regular aspect
|
|
# FontAspect is FA_Undefined, FA_Regular, FA_Bold, FA_Italic, FA_BoldItalic
|
|
# - 0 - - 1 - - 2 - - 3 - - 4 -
|
|
#------------------------------------------------------
|
|
# FONT - font name of font
|
|
# If in list of textfont, not find font with necessary Name, will be used default font "Courier"
|
|
#
|
|
|
|
vtrihedron trihedr
|
|
|
|
vpoint p1 100 100 -400
|
|
vpoint p2 000 000 -400
|
|
vpoint p3 -100 -100 -400
|
|
vdrawtext OC0 OpenCascade -pos 100 100 -400 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color 0.0 1.0 1.0 -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color 0.0 1.0 1.0 -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
vpoint p4 100 100 -500
|
|
vpoint p5 000 000 -500
|
|
vpoint p6 -100 -100 -500
|
|
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color 1.0 0.0 0.0 -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color 1.0 0.0 0.0 -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color 1.0 0.0 0.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
vpoint p7 100 100 -450
|
|
vpoint p8 000 000 -450
|
|
vpoint p9 -100 -100 -450
|
|
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 0.02 1.0 0.0 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 0.02 1.0 0.0 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 0.02 1.0 0.0 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
|
|
vdrawtext L0 _.Left._ -pos 200 200 200 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext L1 _.Left._ -pos 200 200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
vdrawtext R0 _.Right._ -pos 200 200 200 -color 1.0 0.0 1.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext R1 _.Right._ -pos 200 200 200 -color 1.0 0.6078 0.5882 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color 0.0 0.0 1.0 -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color 1.0 0.0 0.0 -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
|
|
|
box atextbox -100 -100 -100 -200 -200 -200
|
|
vdisplay atextbox
|
|
|
|
vdrawtext OC9 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
|
|
vdrawtext OC10 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
|
|
vdrawtext OC11 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
|
|
vdrawtext OC12 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
|
|
|
|
vdrawtext OC13 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
|
|
vdrawtext OC14 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
|
|
vdrawtext OC15 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
|
|
vdrawtext OC16 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
|
|
|
|
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color 1.0 0.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Times-Roman
|
|
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Arbat
|
|
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font Elephant
|
|
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 0.0 1.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font RockWell
|
|
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color 1.0 0.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Arial
|