PEXOCCSetTextPrecision - Set Text Precision (5.0)


Synopsis

 
   void PEXOCCSetTextPrecision(
        PEXOCC context,
        int precision
   )
 
 
   void PEXSetTextPrecision(
        Display *display,
        XID resource_id,
        PEXOCRequestType req_type,
        int precision
   )
 

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).

precision
The text precision (PEXStringPrecision, PEXCharPrecision or PEXStrokePrecision).

Returns

None.

Description

Invoke PEXOCCSetTextPrecision to create an attribute output command which sets the text precision attribute in the renderer's pipeline state according to the value specified by precision.

By setting the text precision attribute's ASF to PEXIndividual (see PEXOCCSetIndividualASF), you use the pipeline state's text precision entry to define how precisely the implementation applies attributes to text (regular and annotated) and clips the text. When you set the text precision attribute's ASF to PEXBundled, the implementation uses the text precision from the text bundle table.

PEXlib defines the following text precisions:

PEXStringPrecision -
applies the text font index, text color, character height, and character expansion attributes to text primitives. (5.0)

The character up vector, text path, text alignment, and character spacing attributes are not necessarily applied to text primitives.

Performs clipping in an implementation-dependent way.

PEXCharPrecision - applies all text attributes to text primitives. (5.0)

Performs clipping at least on a character-by-character basis.

PEXStrokePrecision -
applies all text attributes to text primitives. (5.0)

Performs clipping exactly at the clipping boundaries.

An implementation may substitute any text precision as a better text precision, where PEXStringPrecision is the least precise and PEXStrokePrecision is the best precision.

When text or annotation text is interpreted, the implementation renders the mono-encodings in the text string in the same text precision (least common denominator). If the font group selected by the current text font index consists of both X and PEX fonts, and if some of the mono-encodings in the string are rendered in X fonts, then the text precision of the entire string must be dropped to at least PEXCharPrecision.

If you specify an undefined precision, then the implementation issues a BadPEXOutputCommand error.

This function is a member of the annotation and text attribute set.

Errors

BadPEXOutputCommand
The output command contains an invalid value.

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For an overview and for a list of output attribute functions, see Output Attribute Functions.