jit.gl.text
Description
Draws text in the named drawing context. The text is drawn as 2D, 3D, or outline, depending on the mode attribute. The text can be sent as a symbol, a list of symbols, or as a jit.matrix containing char data. When a jit.matrix is used, each row of the matrix is interpreted as one line of text.
Attributes
align [int]
Text alignment mode (default = 0 (left))
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
3 = 'justify'
depth [float]
The depth (z extent) of the 3D geometry relative to the height of the font (default = 0.) If a depth of 0 is used, no extruded character sides are generated, which will draw much faster. Only valid if mode is 3d.
floatchomp [int]
Toggles floating-point precision rounding.
floatplaces [int]
When float point precision rounding is enabled set via the
attribute, this value sets the precision of the number.fontname [symbol]
Set the name of the font type used.
fontsize [int]
Set the font size in pixels (default = 9). Only valid if mode is 2d.
leadscale [float]
The leading between multiple rows of text as a multiple of the standard leading. (default = 1.)
line_length [float]
The line length specified in gl-units for mode 3d and outline, and in pixels for 2d. Lines of text extending beyond this value will wrap to the next line. The default value of -1 specifies no line length, and therefore no wrapping.
mode [symbol]
Defines how the rendered text is drawn (default = 2d).
Possible values:
'2d'
'3d'
'outline'
plane [int]
The plane of a multi-plane char input matrix which will be interpreted as text. (default = 0)
precision [float]
Sets the precision of the quadratic curve calculation [0 ->inf], The default is 1.0
screenmode [int]
If screenmode = 1, some 3D transformations are skipped so that pixel-accurate text can be drawn. The origin of the text on screen is determined by the usual projection of the object's position, but the text remains the same size. Rotation is only applied around the z axis. Screenmode is useful for making fixed-size labels which follow objects in space. With screenmode off, the text is transformed in space in the usual way for an OB3D-group object. (default = 1) Only valid if mode is 2d.
slant [int]
Text slant (default = normal)
Possible values:
0 = 'normal'
1 = 'italic'
tracking [float]
The tracking (intra-character spacing) as a multiple of the standard tracking for the face. (default = 1.)
weight [int]
Text weight (default = normal)
Possible values:
0 = 'normal'
1 = 'bold'
Common Box Attributes
OB3D Attributes
Messages
append
Arguments
face
Arguments
font
Arguments
size [int]
size
style
text
Arguments
OB3D Messages
See Also
Name | Description |
---|---|
Working with OpenGL | Working with OpenGL |
jit.gl.graph | |
jit.gl.gridshape | |
jit.gl.handle | |
jit.gl.isosurf | |
jit.gl.mesh | |
jit.gl.isosurf | |
jit.gl.mesh | |
jit.gl.model | |
jit.gl.nurbs | |
jit.gl.plato | |
jit.gl.render | |
jit.gl.shader | |
jit.gl.sketch | |
jit.gl.slab | |
jit.gl.texture | |
jit.gl.videoplane | |
jit.gl.volume | |
Tutorial 30: Drawing 3D text | Tutorial 30: Drawing 3D text |