Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GiD_OpenGL register|unregister|registercondition|unregistercondition|draw|drawtext|project|unproject|get|doscrzoffset|drawentity|font|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:

...

  • doscrzoffset <boolean> Special trick to avoid the lines on surfaces hidden by the surfaces.
  • font push pgfont pushfont <font_name font_size>|pop|measure <text>|current|metrics ?-ascent|-descent|-linespace|-fixed?

...

  • type>|popfont|print <text>|dimensions <text>|foreground <red> <green> <blue> <alpha>|background <red> <green> <blue> <alpha>

Push sets the current OpenGL font, pop restores the previous one
measure <text> returns the amount of space in pixels to display this <text>
current returns a list with the current font name and size
metrics returns a list with current font metrics information: -ascent -descent and -linespace in pixels, -fixed is 1 if all characters have equal size . These commands push/pop must be always paired
font types: DefaultFont, AxisFont, LegendFont, LabelFont, GraphFont, AsianFont, TkdrawoglFont, PmFont

Example:

Code Block
GiD_OpenGL fontpgfont push {"Times New Roman" 18}
set with [LabelFont
GiD_OpenGL measuredrawtext "hello world"]
GiD_OpenGL drawtext "hello world"
GiD_OpenGL pop

  • pgfont pushfont <font_type>|popfont|print <text>|dimensions <text>|foreground <red> <green> <blue> <alpha>|background <red> <green> <blue> <alpha>

...

pgfont pop


List of supported OpenGL functions:

...