PEXOCCAnnotationText - 3D Annotation Text Primitive (5.0)


Synopsis

     void PEXOCCAnnotationText(
            PEXOCC context,
            PEXCoord *origin,
            PEXCoord *offset,
            int length,
            char *string
       )

     void PEXAnnotationText(
           Display *display,
           XID resource_id,
           PEXOCRequestType req_type,
           PEXCoord *origin,
           PEXCoord *offset,
           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.

offset
The relative position of the text string from the origin.

length
The number of bytes in the text string.

string
A pointer to the text string.

Returns

None.

Description

Invoke PEXOCCAnnotationText to create an annotation text primitive output command (PEXOCAnnotationText).

This primitive uses the first character set in the text font. Define origin to specify, in modeling coordinates, the position of the first character in the text string. Define offset as a value, in normalized projection coordinates, indicating the relative position of the text from origin. The point where the implementation places the text string is called the annotation point. The implementation computes the annotation point by adding the value of offset to the transformed origin point. The z-component of the annotation point specifies the x-y plane in normalized projection coordinate space on which the annotation text string is placed.

Depending on the text attribute source flag values, this primitive obtains the attributes: text color, text precision, character expansion, character spacing, and the text font index either directly from the current text attribute values or from the entry in the text bundle lookup table specified by the current text bundle index attribute. This primitive also applies the annotation text height, annotation text path, annotation text alignment, annotation text up vector, and annotation text style attributes to the text string.

Only the depth-cueing computation affects the annotation text string's color (the reflectance stage of the rendering pipeline affects only surface primitives) and maps it to a device color.

If your application clips the origin of the primitive, then the implementation clips the entire annotation text primitive. If your application clips the primitive but not the origin, then the implementation clips the annotation text according to PEX text clipping rules. If there is a connection line, then the implementation clips the line according to polyline clipping rules, except that it ignores modeling clipping. The implementation renders the connection line according to the current set of polyline attributes.

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 Annotation Text Attributes.

For an overview, see Output Command Functions.