GiD_OpenGL register|unregister|registercondition|unregistercondition|draw|drawtext|project|unproject|get|doscrzoffset|drawentity|pgfont
This command is a Tcl wrapper of some OpenGL functions. It allows to use OpenGL commands directly from GiD-Tcl.
For example, for C/C++ is used:
...
- pgfont pushfont <font_type>
Push sets the current OpenGL font and add to stack.
font types: DefaultFont, AxisFont, LegendFont, LabelFont, GraphFont, AsianFont, TkdrawoglFont, PmFont - pgfont popfont
Restores the previous font and remove from stack. Commands push/pop must be called always paired
- pgfont print <text>
To draw a <text> in the current 3D location (set by GiD_OpenGL draw -rasterpos [list $x $y $z]). It is similar to GiD_OpenGL drawtext
...
Code Block |
---|
proc GetApproximateFactorPixelToWorld { } {
lassign [GiD_Project view clip_planes_x] left_ortho right_ortho
lassign [GidUtils::GetMainDrawAreaSize] w h
set factor [expr double($right_ortho-$left_ortho)/$w]
return $factor
} |
...
} |
- pgfont foreground <red> <green> <blue> <alpha>
- pgfont background <red> <green> <blue> <alpha>
...