Reference Guide > U–V Routines > VRML_TEXT Procedure
  

VRML_TEXT Procedure
Creates a VRML text object in an open VRML file.
Usage
VRML_TEXT, text
Input Parameters
text—A string, or array of strings containing the VRML object text.
Keywords
Use the following keywords to set the object properties, material properties, font family settings, and font attributes.
Object Properties
The following keywords describe or define the VRML text object.
Center—A 3-element array with coordinate position of the text object centered around designated coordinates [x, y, z].
FontSize—Specifies the point size of the font. (Default: 10)
Left—If set, left-justify the text about the Center-designated coordinates
[x, y, z].
 
note
The Left and Right keywords are mutually exclusive.
Right—If set, right-justify the text about the Center-designated coordinates [x, y, z].
Rotation—A 3-element array specifying rotation angles in degrees around x, y and z. (Default: orientation is horizontal, with text parallel to the x-y plane, reading from –x to +x)
Transform—A 4-by-4 matrix containing the transformation to apply to the object. Applied after Center and Rotation.
Material Properties
The following properties, when set, are applied to the text object.
AmbientColor—A 3-element array of RGB color with each element ranging between 0 and 255. If the value is scalar, then the color is interpreted as grayscale.
DiffuseColor—A 3-element array of RGB color with each element between 0 and 255. If the value is scalar, then the color is interpreted as grayscale.
EmissiveColor—A 3-element array of RGB color with each element ranging between 0 and 255. If the value is scalar, then the color is interpreted as grayscale.
Shininess—A scalar shininess factor, in the range of 0 to 255.
SpecularColor—A 3-element array of RGB color with each element ranging between 0 and 255. If the value is scalar, then the color is interpreted as grayscale.
Texture_Image—A texture image to apply to the object. The image is wrapped completely around the object. The texture image values and transparency values lie in the range of 0 to 255. There are four options:
*(w, h) or (1, w, h)—Grayscale image
*(2, w, h)—Grayscale in (0, *, *) plus transparency in (1, *, *)
*(3, w, h)—True color image (red, green, blue)
*(4, w, h)—True color plus transparency in (3, *, *)
Transparency—A scalar transparency factor, in the range of 0 to 255.
Font Family Settings
These three font attributes are mutually exclusive.
Serif—Serif font (the default).
Sans—Sans-serif font.
Typewriter—Monospaced font.
Font Attributes
Either or both of these keywords may be used. If neither is set, then the typeface is “normal.”
Bold—Boldface type.
Italic—Italic type.
Discussion
The VRML_TEXT procedure uses the VRML text and font features, which provide for 3-D text shapes.
If the text parameter is an array of strings, each string is placed on a separate line in the VRML world. The lines of text objects are centered about the baseline position of the first element string, and the lines are separated based on the point size of the font used.
Example
VRML_OPEN, 'vrml_text.wrl'
VRML_TEXT,['Rogue Wave', 'PV-WAVE'], Center = [0, 5, 0], $
   EmissiveColor = [0, 0, 255], /Bold, /Serif, FontSize = 12
VRML_CLOSE
See Also
VRML_CONE, VRML_CUBE, VRML_CYLINDER, VRML_LINE, VRML_OPEN, VRML_SPHERE, XYOUTS
For a discussion of VRML text and definitions of attributes, see The VRML Sourcebook, by Andrea L. Ames, et al., John Wiley & Sons, Inc., 1996, Chapter 4.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.