1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0032992: Visualization - Font_TextFormatter should wrap words when possible

This commit is contained in:
ngavrilo
2022-07-14 16:53:58 +03:00
committed by smoskvin
parent e1b097eb67
commit 6072d3093c
4 changed files with 58 additions and 8 deletions

View File

@@ -4,21 +4,30 @@ puts ""
puts "==========="
pload MODELING VISUALIZATION
vinit View1
vinit View1 -width 500
vclear
vaxo
box b1 10 0 360 10 180 40
box b1 10 0 460 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
vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 500 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
box b2 10 0 240 10 130 60
box b2 10 0 340 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
vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 400 -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
box b3 10 0 160 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
vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 300 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
box b4 10 200 400 10 130 100
vdisplay b4
vdrawtext t4 "Top text on plane yOz\n(wrapping=120, word wrapping disabled)" -pos 10 205 500 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0
box b5 10 200 160 10 60 200
vdisplay b5
vdrawtext t5 "Top text on plane yOz\n(wrapping=50, word wrapping disabled)" -pos 10 205 350 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0
vright
vfit