mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids. Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'. Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups. Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar) and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar. Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality and reusing tests from 'opengl' testgrid. Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2. while ANGLE library implements only OpenGL ES 3.0. Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality and reusing a limited subset of passing tests from 'opengl' testgrid. Currently testgrid is activated only on Windows platform when using ANGLE library (properietary OpenGL ES drivers do not allow creation of restricted 2.0 context). Test cases have been cleaned out to put bug description into log, to properly load necessary plugins and to explicitly dump viewer.
This commit is contained in:
12
tests/opengl/data/text/A1
Normal file
12
tests/opengl/data/text/A1
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "============"
|
||||
puts "OCC21091"
|
||||
puts "OCC21450"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
vcolorscale cs -range 10 20 100 -font 16 -textpos right -xy 0 0
|
||||
|
||||
vglinfo
|
||||
vdump ${imagedir}/${casename}.png
|
75
tests/opengl/data/text/A2
Normal file
75
tests/opengl/data/text/A2
Normal file
@@ -0,0 +1,75 @@
|
||||
puts "============"
|
||||
puts "OCC21091"
|
||||
puts "OCC21450"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
vfont add [locate_data_file DejaVuSansMono.ttf] MonoFont
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
vfont add [locate_data_file DejaVuSerif.ttf] SerifFont
|
||||
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
|
||||
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 CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color CYAN -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color CYAN -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint p4 100 100 -500
|
||||
vpoint p5 000 000 -500
|
||||
vpoint p6 -100 -100 -500
|
||||
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color RED -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color RED -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color RED -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint p7 100 100 -450
|
||||
vpoint p8 000 000 -450
|
||||
vpoint p9 -100 -100 -450
|
||||
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 05FF00 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 05FF00 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 05FF00 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color WHITE -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color YELLOW -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color MAGENTA -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color FF9B96 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color BLUE -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color RED -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
box atextbox -100 -100 -100 -200 -200 -200
|
||||
vdisplay atextbox
|
||||
|
||||
vdrawtext OC9 OpenCascade -pos -300 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color MAGENTA -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color CYAN -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color YELLOW -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 00FF05 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font monospace
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color FF0005 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font monospace
|
||||
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
||||
|
||||
vsensdis
|
||||
vdump $imagedir/${casename}_sensitive.png
|
26
tests/opengl/data/text/A3
Normal file
26
tests/opengl/data/text/A3
Normal file
@@ -0,0 +1,26 @@
|
||||
puts "============"
|
||||
puts "OCC23457 Text rendering performance"
|
||||
puts "Test case performs rendering of single huge text label"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vtrihedron trihedr
|
||||
|
||||
set aFileHandle [open [locate_data_file screw.step] r]
|
||||
set aText [read $aFileHandle]
|
||||
close $aFileHandle
|
||||
|
||||
vpoint p0 0 0 -400
|
||||
vpoint p1 0 10000 -400
|
||||
vpoint p2 1000 0 -400
|
||||
vfit
|
||||
|
||||
vdrawtext text "$aText" -pos 100 100 -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
41
tests/opengl/data/text/A4
Normal file
41
tests/opengl/data/text/A4
Normal file
@@ -0,0 +1,41 @@
|
||||
puts "============"
|
||||
puts "OCC23457 Text rendering performance"
|
||||
puts "Test case performs rendering of big number of small text labels"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
cpulimit 1000
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vtrihedron trihedr
|
||||
|
||||
set aFileHandle [open [locate_data_file screw.step] r]
|
||||
set aFileData [read $aFileHandle]
|
||||
close $aFileHandle
|
||||
|
||||
vpoint p0 0 0 -400
|
||||
vpoint p1 0 10000 -400
|
||||
vpoint p2 1000 0 -400
|
||||
|
||||
set data [split $aFileData "\n"]
|
||||
set aLineId 0
|
||||
foreach aLine $data {
|
||||
set aLineY [expr $aLineId * 400]
|
||||
vdrawtext "Line_$aLineId" "$aLine" -noupdate -pos 100 $aLineY -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 0 -height 20 -aspect regular -font SansFont
|
||||
set aLineId [expr $aLineId + 1]
|
||||
}
|
||||
|
||||
puts "Number of labels: $aLineId"
|
||||
|
||||
vfit
|
||||
vzfit
|
||||
vzoom 20
|
||||
|
||||
vfps
|
||||
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
44
tests/opengl/data/text/A5
Normal file
44
tests/opengl/data/text/A5
Normal file
@@ -0,0 +1,44 @@
|
||||
puts "============"
|
||||
puts "OCC23457 Text rendering performance"
|
||||
puts "Test case prints 3D labels with different text alignment styles"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vtrihedron trihedr
|
||||
|
||||
vpoint pTL -700 100 600
|
||||
vdrawtext Text0 "Top-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 600 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pTC 0 100 600
|
||||
vdrawtext Text1 "Top-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 600 -color CYAN -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pTR 700 100 600
|
||||
vdrawtext Text2 "Top-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 600 -color CYAN -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCL -700 100 -100
|
||||
vdrawtext Text3 "Center-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -100 -color WHITE -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCC 0 100 -100
|
||||
vdrawtext Text4 "Center-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -100 -color WHITE -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCR 700 100 -100
|
||||
vdrawtext Text5 "Center-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -100 -color WHITE -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBL -700 100 -700
|
||||
vdrawtext Text6 "Bottom-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -700 -color YELLOW -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBC 0 100 -700
|
||||
vdrawtext Text7 "Bottom-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -700 -color YELLOW -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBR 700 100 -700
|
||||
vdrawtext Text8 "Bottom-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -700 -color YELLOW -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vfit
|
||||
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
45
tests/opengl/data/text/A6
Normal file
45
tests/opengl/data/text/A6
Normal file
@@ -0,0 +1,45 @@
|
||||
puts "============"
|
||||
puts "OCC23457 Text rendering performance"
|
||||
puts "Test case prints 3D labels with different text alignment styles and extra spaces in it"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
set THE_FONT_NAME sans-serif
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
|
||||
vtrihedron trihedr
|
||||
|
||||
vpoint pTL -700 100 600
|
||||
vdrawtext Text0 " Top-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 600 -color CYAN -halign left -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pTC 0 100 600
|
||||
vdrawtext Text1 " Top-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 600 -color CYAN -halign center -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pTR 700 100 600
|
||||
vdrawtext Text2 " Top-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 600 -color CYAN -halign right -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCL -700 100 -100
|
||||
vdrawtext Text3 " Center-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -100 -color WHITE -halign left -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCC 0 100 -100
|
||||
vdrawtext Text4 " Center-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -100 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCR 700 100 -100
|
||||
vdrawtext Text5 " Center-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -100 -color WHITE -halign right -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBL -700 100 -700
|
||||
vdrawtext Text6 " Bottom-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -700 -color YELLOW -halign left -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBC 0 100 -700
|
||||
vdrawtext Text7 " Bottom-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -700 -color YELLOW -halign center -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBR 700 100 -700
|
||||
vdrawtext Text8 " Bottom-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -700 -color YELLOW -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vfit
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
38
tests/opengl/data/text/A7
Normal file
38
tests/opengl/data/text/A7
Normal file
@@ -0,0 +1,38 @@
|
||||
puts "============"
|
||||
puts "OCC23457 Text rendering performance"
|
||||
puts "Test case prints overlay labels with different subtitle styles"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
set aParams "-height 16 -font SansFont -2d -persPos -1 1 -subColor BLUE"
|
||||
|
||||
vclear
|
||||
vviewparams -scale 254.5 -proj 0.89 -0.37 0.26 -up -0.21 0.16 0.96 -at 0.69 1.05 1.46
|
||||
|
||||
vdrawtext td "Overlay Test Decal" {*}$aParams -pos 20 -100 0 -color WHITE -dispType decal
|
||||
vdrawtext ts "Overlay Test Shadow" {*}$aParams -pos 20 -150 0 -color WHITE -dispType shadow
|
||||
vdrawtext tx "Overlay Test XOR" {*}$aParams -pos 20 -200 0 -color YELLOW -dispType blend
|
||||
vdrawtext tt "Overlay Test Subtitle" {*}$aParams -pos 20 -250 0 -color WHITE -dispType subtitle
|
||||
vdrawtext tw "Overlay Test Normal" {*}$aParams -pos 20 -300 0 -color WHITE -dispType normal
|
||||
vdrawtext tb "Overlay Test Normal" {*}$aParams -pos 20 -350 0 -color GRAY33 -dispType normal
|
||||
|
||||
vdrawtext td2 " Overlay Test Decal \n Second line" {*}$aParams -pos 200 -100 0 -color WHITE -dispType decal
|
||||
vdrawtext ts2 " Overlay Test Shadow \n Second line" {*}$aParams -pos 200 -150 0 -color WHITE -dispType shadow
|
||||
vdrawtext tx2 " Overlay Test XOR \n Second line" {*}$aParams -pos 200 -200 0 -color YELLOW -dispType blend
|
||||
vdrawtext tt2 " Overlay Test Subtitle\n Second line" {*}$aParams -pos 200 -250 0 -color WHITE -dispType subtitle
|
||||
vdrawtext tw2 " Overlay Test Normal \n Second line" {*}$aParams -pos 200 -300 0 -color WHITE -dispType normal
|
||||
vdrawtext tb2 " Overlay Test Normal \n Second line" {*}$aParams -pos 200 -350 0 -color GRAY33 -dispType normal
|
||||
|
||||
box b 1 2 3
|
||||
vdisplay -dispMode 1 b
|
||||
vselprops localSelHighlight -dispMode 1 -material SILVER -color WHITE
|
||||
vselmode b FACE 1
|
||||
vselect 190 250
|
||||
|
||||
vglinfo
|
||||
vdump ${imagedir}/${casename}.png
|
70
tests/opengl/data/text/A8
Normal file
70
tests/opengl/data/text/A8
Normal file
@@ -0,0 +1,70 @@
|
||||
puts "============"
|
||||
puts "OCC24387"
|
||||
puts "============"
|
||||
puts ""
|
||||
#################################################
|
||||
# Draw the text with different fonts.
|
||||
#################################################
|
||||
|
||||
pload TOPTEST VISUALIZATION
|
||||
vinit View1
|
||||
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
|
||||
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 CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color CYAN -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color CYAN -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 RED -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color RED -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color RED -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 05FF00 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 05FF00 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 05FF00 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color WHITE -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color YELLOW -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color MAGENTA -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color FF9B96 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color BLUE -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color RED -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 GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color MAGENTA -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Times-Roman
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color CYAN -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color YELLOW -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font sans-serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 00FF05 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font sans-serif
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color FF0005 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Arial
|
||||
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
26
tests/opengl/data/text/C1
Normal file
26
tests/opengl/data/text/C1
Normal file
@@ -0,0 +1,26 @@
|
||||
puts "============"
|
||||
puts "OCC26298 make font resolution configurable"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vclear
|
||||
vinit View1
|
||||
vtop
|
||||
|
||||
vrenderparams -resolution 72
|
||||
|
||||
vdrawtext t0 TopLeftText -pos -100 100 0 -font SansFont -color yellow -valign top -halign left
|
||||
vdrawtext t1 CenterText -pos 0 0 0 -font SansFont -color green -valign center -halign center
|
||||
vdrawtext t2 BottomRightText -pos 100 -100 0 -font SansFont -color red -valign bottom -halign right
|
||||
vfit
|
||||
vdump $imagedir/${casename}_72.png
|
||||
|
||||
vrenderparams -resolution 96
|
||||
vdump $imagedir/${casename}_96.png
|
||||
|
||||
vrenderparams -resolution 144
|
||||
vdump $imagedir/${casename}_144.png
|
37
tests/opengl/data/text/C2
Normal file
37
tests/opengl/data/text/C2
Normal file
@@ -0,0 +1,37 @@
|
||||
puts "================"
|
||||
puts "0022149: Strings with Japanese characters can not be displayed in 3D viewer"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vpoint p0 0 0 0
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
vclear
|
||||
vinit View1
|
||||
vtop
|
||||
vpoint p00 0 0 0
|
||||
vpoint p01 0 10 0
|
||||
vpoint p11 10 10 0
|
||||
vpoint p10 10 0 0
|
||||
vfit
|
||||
vzoom 0.8
|
||||
vdrawtext t0 "한국어 (Korean) Čeština" -pos 0 0 0 -halign left -font korean
|
||||
vdrawtext t1 "한국어 (Korean) Čeština" -pos 10 1 0 -halign right -font sans
|
||||
vdrawtext t2 "简体中文 (Chinese)" -pos 0 2 0 -halign left -font cjk
|
||||
vdrawtext t3 "简体中文 (Chinese)" -pos 10 3 0 -halign right -font sans
|
||||
vdrawtext t4 "あ (Japanese)" -pos 0 4 0 -halign left -font cjk
|
||||
vdrawtext t5 "あ (Japanese)" -pos 10 5 0 -halign right -font sans
|
||||
|
||||
vdump $imagedir/${casename}.png
|
||||
|
||||
# just print font list
|
||||
vfont
|
29
tests/opengl/data/text/C3
Normal file
29
tests/opengl/data/text/C3
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "================"
|
||||
puts "0031079: Visualization - embed minimal fallback font"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
puts "REQUIRED All: Font_FontMgr, error: unable to find any font!"
|
||||
puts "REQUIRED All: Font_FontMgr, error: unable to find Western fallback font!"
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
dtracelevel trace
|
||||
pload VISUALIZATION
|
||||
|
||||
vfont -verbose 1
|
||||
vfont -clear
|
||||
# print empty list
|
||||
vfont
|
||||
|
||||
vclear
|
||||
vinit View1
|
||||
vpoint p0 0 0 0
|
||||
vviewcube vc
|
||||
vdrawtext t "My Text, он мой!" -font "UNKNOWN" -aspect italic -pos 0 0 0 -2d -persPos -1 1 30
|
||||
text2brep b "My Text, он мой!" -font "UNKNOWN" -aspect italic
|
||||
vtop
|
||||
vdisplay -dispMode 1 b
|
||||
vfit
|
||||
|
||||
vdump $imagedir/${casename}.png
|
26
tests/opengl/data/text/C4
Normal file
26
tests/opengl/data/text/C4
Normal file
@@ -0,0 +1,26 @@
|
||||
puts "================"
|
||||
puts "0031118: Visualization - Font_FontMgr skips fonts with unknown styles like Narrow or Black"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
dtracelevel trace
|
||||
pload VISUALIZATION
|
||||
|
||||
# Do the trick - find any pair of fonts with and without "Narrow" style suffix.
|
||||
# On Windows it might be "Arial" and "Arial Narrow", on Linux "Liberation Sans" and "Liberation Sans Narrow".
|
||||
vfont -verbose 1
|
||||
set aFontN [vfont -strict -find "* Narrow"]
|
||||
set aFontR [string map {" Narrow" ""} $aFontN]
|
||||
vfont -strict -findInfo "$aFontN"
|
||||
vfont -strict -findInfo "$aFontR"
|
||||
|
||||
vclear
|
||||
vinit View1
|
||||
vpoint p0 0 0 0
|
||||
vpoint p1 0 10 0
|
||||
vdrawtext t1 "My Text \[$aFontR\]" -font "$aFontR" -pos 0 5 0
|
||||
vdrawtext t2 "My Text \[$aFontN\]" -font "$aFontN" -pos 0 6 0
|
||||
vtop
|
||||
vfit
|
||||
|
||||
vdump $imagedir/${casename}.png
|
31
tests/opengl/data/text/D1
Normal file
31
tests/opengl/data/text/D1
Normal file
@@ -0,0 +1,31 @@
|
||||
puts "==========="
|
||||
puts "0026343: Visualization - Zoom persistent text with 3D orientation"
|
||||
puts ""
|
||||
puts "==========="
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vclear
|
||||
vaxo
|
||||
|
||||
set x 10
|
||||
set y 50
|
||||
set z 30
|
||||
|
||||
box b $x $y $z
|
||||
vdisplay b
|
||||
vtrihedron tri0
|
||||
|
||||
vdrawtext t0 "Top text on plane yOz" -pos $x 0 $z -color green -height 20 -plane 1 0 0 0 1 0 -valign top -font SansFont
|
||||
vdrawtext t1 "Bottom text on plane yOz" -pos 0 $y 0 -color green -height 20 -plane -1 0 0 0 -1 0 -valign bottom -font SansFont
|
||||
|
||||
vdrawtext t2 "Some text on the top face" -pos $x/2 $y/2 $z -color red -height 20 -plane 0 0 1 0 1 0 -valign center -halign center -font SansFont
|
||||
|
||||
vdrawtext t3 "First line\nSecond line" -pos $x/2 0 $z/2 -color 0.0 0.0 1.0 -height 20 -plane 0 -1 0 0 0 1 -valign center -halign center -font SansFont
|
||||
|
||||
vfit
|
||||
vglinfo
|
||||
vdump $imagedir/${casename}.png
|
18
tests/opengl/data/text/bug22149
Normal file
18
tests/opengl/data/text/bug22149
Normal file
@@ -0,0 +1,18 @@
|
||||
puts "================"
|
||||
puts "0022149: Strings with Japanese characters can not be displayed in 3D viewer"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
dtracelevel trace
|
||||
vfont -verbose 1
|
||||
vfont add [locate_data_file bug22149_mona.ttf] Mona
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vdrawtext text0 HELLO -pos 0 0 0 -color GREEN -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular
|
||||
vdrawtext text1 [encoding convertfrom unicode \x42\x30] -pos 0 0 200 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font Mona
|
||||
vdrawtext text2 [encoding convertfrom unicode \x42\x30] -pos 0 0 400 -color BLUE -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font cjk
|
||||
vdrawtext text3 [encoding convertfrom unicode \x5C\xD5\x6D\xAD\xB4\xC5] -pos 0 0 -200 -color MAGENTA -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font korean
|
||||
|
||||
vdump $imagedir/${casename}.png
|
12
tests/opengl/data/text/bug22796_1
Normal file
12
tests/opengl/data/text/bug22796_1
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "============"
|
||||
puts "OCC22796: Possibility to display multi-line text in 3D"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vdrawtext text0 "MyTest1\rHello,\tWor\vld!\nMyTest2\t\a\bMyTest3" -pos 0 0 0 -color WHITE -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdump $imagedir/${casename}.png
|
12
tests/opengl/data/text/bug22796_2
Normal file
12
tests/opengl/data/text/bug22796_2
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "============"
|
||||
puts "OCC22796: Possibility to display multi-line text in 3D"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
vinit View1
|
||||
vfont add [locate_data_file bug22149_mona.ttf] Mona
|
||||
set s [encoding convertfrom unicode "\x42\x30\x09\x00\x79\x30\x0A\x00\x6F\x30\x42\x26"]
|
||||
vdrawtext text0 $s -pos 0 0 0 -color WHITE -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Mona
|
||||
|
||||
vdump $imagedir/${casename}.png
|
29
tests/opengl/data/text/bug24555
Normal file
29
tests/opengl/data/text/bug24555
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "============"
|
||||
puts "OCC24555: Visualization - the same text is rendered with shift at second time"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vclear
|
||||
vaxo
|
||||
vdrawtext text0 "This program" -pos 0 0 0 -color GREEN -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext text1 "This program" -pos 0 0 0 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
vdump $imagedir/${casename}.png
|
25
tests/opengl/data/text/bug25121
Normal file
25
tests/opengl/data/text/bug25121
Normal file
@@ -0,0 +1,25 @@
|
||||
puts "================"
|
||||
puts "OCC25121: Visualization, OpenGl_Text - correct scaling factor for fixed-size text at 3D point"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
|
||||
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 WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 001_3D "001 3D" -pos 0.0 1.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 101_3D "101 3D" -pos 0.0 2.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 110_3D "110 3D" -pos 0.0 3.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext t1 "000 2D" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t2 "001 2D" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t3 "101 2D" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t4 "110 2D" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
|
||||
vdump $imagedir/${casename}.png
|
27
tests/opengl/data/text/bug25732_1
Normal file
27
tests/opengl/data/text/bug25732_1
Normal file
@@ -0,0 +1,27 @@
|
||||
puts "========"
|
||||
puts "OCC25732: Visualization, TKOpenGl - back face culling should not affect textured font rendering"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
box b -100 0 -200 50 100 200
|
||||
|
||||
vinit View1
|
||||
vclear
|
||||
vaxo
|
||||
|
||||
vdisplay b
|
||||
vfit
|
||||
vsetdispmode b 1
|
||||
|
||||
vdrawtext text "Open\nCASCADE" -pos 0 0 0 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
set x_coord 255
|
||||
set y_coord 277
|
||||
|
||||
set bug_info [vreadpixel ${x_coord} ${y_coord} rgb name]
|
||||
if {$bug_info != "RED"} { puts "ERROR: OCC25732 is reproduced. Text is missed." }
|
||||
|
||||
vdump $imagedir/${casename}.png
|
23
tests/opengl/data/text/bug25732_2
Normal file
23
tests/opengl/data/text/bug25732_2
Normal file
@@ -0,0 +1,23 @@
|
||||
puts "========"
|
||||
puts "OCC25732: Visualization, TKOpenGl - back face culling should not affect textured font rendering"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
box b 1 2 3
|
||||
explode b F
|
||||
|
||||
vinit View1
|
||||
vsetdispmode 1
|
||||
|
||||
vdisplay b_1 b_2
|
||||
vfit
|
||||
|
||||
vdrawtext text "SAMPLE TEXT" -pos 1 0 3 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 30 -aspect regular -font SansFont
|
||||
|
||||
set bug_info [vreadpixel 260 137 rgb name]
|
||||
if {$bug_info != "RED"} { puts "ERROR: OCC25732 is reproduced. Text is missed." }
|
||||
|
||||
vdump $imagedir/${casename}.png
|
12
tests/opengl/data/text/bug27624
Normal file
12
tests/opengl/data/text/bug27624
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "========"
|
||||
puts "CR27624: Draw Harness, ViewerTest - vdrawtext command ignores text display options"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vdrawtext t1 "Subtitle" -height 20 -font SansFont -color GREEN -disptype subtitle -subcolor 4C4C4C
|
||||
vfit
|
||||
vdump $imagedir/${casename}.png
|
32
tests/opengl/data/text/bug28099_text_core
Normal file
32
tests/opengl/data/text/bug28099_text_core
Normal file
@@ -0,0 +1,32 @@
|
||||
puts "============"
|
||||
puts "OCC28099: handle DIMENSION and SUBTITLE styles within Core Profile"
|
||||
puts "Test case prints overlay labels with different subtitle styles"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vclear
|
||||
vcaps -core 1
|
||||
vinit View1
|
||||
vaxo
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vdrawtext t1 "Overlay Test Blend" -2d -perspos -1 1 -pos 100 -50 0 -height 16 -font SansFont -color YELLOW -disptype blend -subcolor BLUE
|
||||
vdrawtext t2 "Overlay Test Decal" -2d -perspos -1 1 -pos 100 -100 0 -height 16 -font SansFont -color YELLOW -disptype decal -subcolor BLUE
|
||||
vdrawtext t3 "Overlay Test Subtitle" -2d -perspos -1 1 -pos 100 -150 0 -height 16 -font SansFont -color YELLOW -disptype subtitle -subcolor BLUE
|
||||
vdrawtext t4 "Overlay Test Normal" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color CYAN -disptype normal -subcolor BLUE
|
||||
|
||||
vdrawtext t5 " Overlay Test Normal \n Second line" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color CYAN -disptype normal -subcolor BLUE
|
||||
vdrawtext t6 " Overlay Test Subtitle\n Second line" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color YELLOW -disptype subtitle -subcolor BLUE
|
||||
vdrawtext t7 " Overlay Test Decal \n Second line" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color YELLOW -disptype decal -subcolor BLUE
|
||||
vdrawtext t8 " Overlay Test Blend \n Second line" -2d -perspos -1 1 -pos 100 -400 0 -height 16 -font SansFont -color YELLOW -disptype blend -subcolor BLUE
|
||||
|
||||
box b 50 50 50
|
||||
vdisplay -dispMode 1 b
|
||||
|
||||
vpoint lengthP1 0 50 50
|
||||
vpoint lengthP2 50 50 50
|
||||
vdimension dim1 -length -plane xoy -shapes lengthP1 lengthP2 -font SansFont
|
||||
vfit
|
||||
|
||||
vdump $::imagedir/${::casename}.png
|
17
tests/opengl/data/text/bug30922
Normal file
17
tests/opengl/data/text/bug30922
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============="
|
||||
puts "0030922: Visualization - OpenGl_Text wrong local transformation if text has not own attach point"
|
||||
puts "============="
|
||||
|
||||
pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vtrihedron trihedr
|
||||
|
||||
vdrawtext Text "First line\nSecond line" -pos 10 0 0 -color red -plane 1 0 0 0 1 0 -flipping -halign center -valign top -height 50 -font SansFont
|
||||
vright
|
||||
vlocation Text -translate 0 10 150
|
||||
|
||||
if {[vreadpixel 106 232 rgb name] == "RED"} { puts "ERROR: the text is not moved" }
|
||||
|
||||
vdump $imagedir/${casename}.png
|
19
tests/opengl/data/text/bug31193
Normal file
19
tests/opengl/data/text/bug31193
Normal file
@@ -0,0 +1,19 @@
|
||||
puts "============="
|
||||
puts "0031193: Visualization - OpenGl_Flipping wrong text position if local transformation set"
|
||||
puts "============="
|
||||
|
||||
pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit View1
|
||||
vtrihedron trihedr
|
||||
|
||||
vdrawtext Text "First line\nSecond line" -pos 10 0 0 -color red -plane 1 0 0 0 1 0 -flipping -halign center -valign top -height 50 -font SansFont
|
||||
|
||||
vright
|
||||
vrotate 0 3.14 0
|
||||
vlocation Text -rotate 0 0 0 0 1 0 180
|
||||
|
||||
if {[vreadpixel 67 126 rgb name] == "RED"} { puts "ERROR: the text is not flipped" }
|
||||
|
||||
vdump $imagedir/${casename}.png
|
28
tests/opengl/data/text/tabs
Normal file
28
tests/opengl/data/text/tabs
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "============"
|
||||
puts "0031762: Visualization, Font_TextFormatter - tabulation length is respected with one extra symbol shift"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
vinit View1
|
||||
vtop
|
||||
vdrawtext tm1 "1234567890\n1\t90\n12\t90\n123\t90\n1234\t90" -pos 0 0 0 -font MONOSPACE
|
||||
vdrawtext ts1 "1234567890\n1\t90\n12\t90\n123\t90\n1234\t90" -pos 50 0 0 -font SansFont
|
||||
# 1234567890
|
||||
# 1 9
|
||||
|
||||
vdrawtext tm2 "1234567890\n#1\t90\n#12\t90\n#123\t90\n#1234\t90" -pos 0 -25 0 -font MONOSPACE
|
||||
vdrawtext ts2 "1234567890\n#1\t90\n#12\t90\n#123\t90\n#1234\t90" -pos 50 -25 0 -font SansFont
|
||||
# 1234567890
|
||||
# #1 9
|
||||
|
||||
vdrawtext tm3 "1234567890\n1\t 90\n12\t 90\n123\t 90\n1234\t 90" -pos 0 -50 0 -font MONOSPACE
|
||||
vdrawtext ts3 "1234567890\n1\t 90\n12\t 90\n123\t 90\n1234\t 90" -pos 50 -50 0 -font SansFont
|
||||
# 1234567890
|
||||
# 1 9
|
||||
|
||||
vviewparams -scale 11.5 -proj 0 0 1 -up 0 1 0 -at 36 -18 0
|
||||
|
||||
vdump $imagedir/${casename}.png
|
27
tests/opengl/data/text/text_wrapped
Normal file
27
tests/opengl/data/text/text_wrapped
Normal file
@@ -0,0 +1,27 @@
|
||||
puts "==========="
|
||||
puts "0030537: Visualization - wrapping text in font text formatter"
|
||||
puts ""
|
||||
puts "==========="
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vinit View1
|
||||
vclear
|
||||
vaxo
|
||||
|
||||
box b1 10 0 360 10 180 40
|
||||
vdisplay b1
|
||||
vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 400 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||
|
||||
box b2 10 0 240 10 130 60
|
||||
vdisplay b2
|
||||
vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 300 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||
|
||||
box b3 10 0 60 10 60 150
|
||||
vdisplay b3
|
||||
vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 200 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||
|
||||
vright
|
||||
vfit
|
||||
vzoom 0.9
|
||||
|
||||
vdump $imagedir/${casename}.png
|
Reference in New Issue
Block a user