PEXOCCText - 3D Text Primitive (5.0)


Synopsis

 
     void PEXOCCText(
          PEXOCC context,
          PEXCoord *origin
          PEXVector *vector1,
          PEXVector *vector2,
          int length,
          char *string
      )

 
     void PEXText(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          PEXCoord *origin,
          PEXVector *vector1,
          PEXVector *vector2,
          int length,
          char *string
     )
 

Arguments

context
An OC context returned by a successful PEXCreateOCC call.

display (OCC)
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id (OCC)
The resource identifier of the renderer or structure.

req_type (OCC)
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

origin
The origin of the text string.

vector1
A vector defining the positive x-direction of the text local coordinate system.

vector2
A vector defining the positive y-direction of the text local coordinate system

length
The number of bytes in the text string.

string
A pointer to the text string.

Returns

None.

Description

Invoke PEXOCCText to create a text primitive output command (PEXOCText).

This primitive only uses the first character set in the text font.

The text string is located on a plane defined by its position and direction vectors. The origin defines the position, in model coordinates, at which to render the text string. The two direction vectors define the positive x- and y-directions of the text local coordinate system. If the two vectors are parallel or if one of the vectors has zero length, then PEXlib uses the vector values <1,0,0> and <0,1,0>.

During rendering, the string's position is transformed to a position in device coordinates. Only depth-cueing affects the string's color and maps it to a device color. Clipping of the text string depends on the current text precision attribute:

PEXStringPrecision -
clips text in an implementation-dependent way.

PEXCharPrecision -
clips text done on at least a character-by-character basis.

PEXStrokePrecision -
performs clipping at the clipping boundaries for each character.

Depending on the setting of the text attribute source flag values, this primitive obtains the attributes: text color, text precision, character expansion, character spacing, and text font either directly from the current text attribute values or from the entry in the text bundle table entry specified by the current text bundle index attribute. The primitive also uses the current character height, text path, text alignment attributes and character up vector to render the text string. The directions specified by the character up vector and text path are relative to the text local coordinate system.

Errors

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For primitives similar to this one, see:

For PEXlib 5.1 compatibility primitives similar to this one, see:

For attributes that affect this primitive, see Text Attributes.

For an overview, see Output Command Functions.