PEXEndPickOne - End Pick One (5.1)


Synopsis

 
     PEXPickPath *PEXEndPickOne(
          Display *display,
          PEXRenderer renderer,
          int *status_return,
          int *undetectable_return
   )
 

Arguments

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

renderer
The resource identifier of the renderer.

status_return
Returns the status of the pick operation (PEXPick, PEXNoPick or PEXAbortedPick).

undetectable_return
Returns True if another primitive better satisfies the pick criteria with the exception that it did not pass the pick filter test.

Returns

A pointer to the pick path; a null pointer if unsuccessful or no pick (see also status_return).

Description

Invoke PEXEndPickOne to terminate an immediate-mode pick, get the hierarchical pick path to the closest or last hit primitive, and set the renderer state to PEXIdle.

If a primitive was picked, then the returned pick status is PEXPick. If no primitive was picked, then the returned pick status is PEXNoPick, and the returned pick path is a null pointer. If the renderer's drawable was destroyed or resized during the pick operation, then the returned pick status is PEXAbortedPick and the returned pick path is a null pointer.

If there was a primitive which more closely satisfied the pick criteria, but did not pass the pick filter test, then the undetectable pick return status is True. Otherwise, it is False.

If the renderer state is currently PEXIdle when you invoke this function (i.e., no picking is in progress or the rendering was aborted due to a resize), then the implementation ignores this function and does not issue any errors. If the renderer state is currently PEXRendering or PEXMultipassRendering, or if the pick operation in progress is a pick all, then the implementation issues a BadPEXRendererState error and does not change the renderer's renderer state.

PEXlib allocates memory for the return value. Invoke PEXFreePickPaths to deallocate the memory.

Errors

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXRendererState
The renderer state is PEXRendering or PEXMultipassRendering, or was set to PEXPicking through function PEXBeginPickAll.

See Also

For a list of all Renderer Pick functions and related topics, see Renderer Picking.