1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zeText

Use .new("text") to create the object. It uses zeFreetype to generate texture-mapped text. The image can be output to an array and used later for texture or rendered as points.

:font(object)

object - a zeFreetype object.

Sets the Freetype object to be used to generate text bitmap.

:fontsize(size)

size - a number to specify the font size in point.

Sets the font size to the specified number of pixels per inch. It should be calleb before calling the text() function.

:text(string)

string - a string of text.

Parses the string and use the results as the text content. The tags of ‹sym› and ‹/sym› mark the number between them as the Unicode of a character; ‹sup› and ‹/sup› marks a string as superscript; and ‹sub› and ‹sub› makrs a string as subscript. Multi-bytes characters (e.g., Japanese and Chinese) can be used if the font file supports them. The functions returns the image width and height.

:set(table)

table - a Lua table.

Sets text properties. Valid key-value paris are listed in the table.

Key Value Type Remark
color {r, g, b, a} Numbers (0 to 1) in table Sets the text color.
layout {x0, y0, z0, x1, y1, z1, x2, y2, z2} Numbers in table Sets the plane on which the text will be drawn. The plane is determined by vectors from (x0,y0,z0) to (x1,y1,z1) and to (x2,y2,z2)
enable flag Boolean Enables or disables the object.