mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
Add THE_DEFAULT_RESOLUTION static const parameter to Graphic3d_RenderingParams. Add resolution to Graphic3d_RenderingParams. Drop redundant variables from OpenGl_Workspace. Add a new parameter to Graphic3d_GraphicDriver::TextSize method (and to OpenGl_GraphicDriver). Add a new parameter to OpenGl_Text::Render() and to OpenGl_Text::render() methods. OpenGl_Text::FontKey() considers a resolution (PPI) now. Add a new argument '-resolution' (sets a pixel density) in the 'VRenderParams' draw-command.
32 lines
694 B
Plaintext
32 lines
694 B
Plaintext
puts "============"
|
|
puts "OCC26298 make font resolution configurable"
|
|
puts "============"
|
|
puts ""
|
|
pload VISUALIZATION
|
|
|
|
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
|
|
|
vclear
|
|
vclose all
|
|
|
|
vinit
|
|
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}_1.png
|
|
|
|
vrenderparams -resolution 96
|
|
|
|
vdump $imagedir/${casename}_2.png
|
|
|
|
vrenderparams -resolution 144
|
|
|
|
vdump $imagedir/${casename}_3.png
|