PEXOCCSetColorApproxIndex - Set Color Approximation Index (5.0)


Synopsis

     void PEXOCCSetColorApproxIndex(
          PEXOCC context,
          unsigned int index
     )
     void PEXSetColorApproxIndex(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          unsigned int index
     )

Arguments

context
An OC context returned by a successful PEXCreateOCCcall.

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

index
The color approximation table index.

Returns

None.

Description

Invoke PEXOCCSetColorApproxIndex to create an attribute output command which sets the color approximation index attribute in the renderer's pipeline state according to the value specified by index.

Use color approximation index to select an entry of the renderer's color approximation table. Color approximation defines how, at the end of the rendering pipeline, colors (except their alpha components) are transformed into pixel values.

If you specify an undefined color index, then the index defaults to color index zero. If the index you specify exceeds 65534, then the implementation issues a BadPEXOutputCommand error.

The color approximation function is a member of the global attribute set.

Errors

BadPEXOutputCommand
The color approximation index value exceeds 65534.

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 all output attribute functions, see Output Attribute Functions.