PEXOCCSetDrawingFunction - Set Drawing Function (5.2)


Synopsis

 
    void PEXOCCSetDrawingFunction(
         PEXOCC context,
         unsigned int function
    )
 

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

function
The drawing function.

Returns

None.

Description

Invoke PEXOCCSetDrawingFunction to set the drawing function attribute of the renderer's pipeline state according to the value specified by function.

Define the drawing function to specify how the implementation, after color approximation, combines newly drawn pixels with existing pixels in the drawable. This function applies only to image planes and to the rendering of all output primitives.

The registered values, derived from Xlib definitions (defined in X.h), for the drawing functions are shown in the following table:

 
Drawing Functions
-----------------------------------------
Symbol          Description
-----------------------------------------
GXclear         all 0's
GXand           src AND dest
GXandReverse    src AND (NOT dest)
GXcopy          src
GXandInverted   (NOT src) AND dest
GXnoop          dst
GXxor           src XOR dest
GXor            src OR dest
GXnor           (NOT src) AND (NOT dest)
GXequiv         (NOT src) XOR dest
GXinvert        NOT dest
GXorReverse     src OR (NOT dest)
GXcopyInverted  NOT src
GXorInverted    (NOT src) OR dest
GXnand          (NOT src) OR (NOT dest)
GXset           all 1's
 
-----------------------------------------
 

If you enabled echoing with method PEXEchoXORColor, then the drawing function you select is overridden. The drawing functions, except GXcopy, interact with alpha blending, antialiasing, transparency, and plane masking, except for all planes enabled, in an implementation-dependent way.

If you specify an undefined drawing function value, then the implementation issues a BadPEXOutputCommand error.

This function is a member of the global attribute set and affects all output primitives.

Errors

BadPEXOutputCommand
The specified function is not registered.

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.