## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Correlation and Retained Segments

To be a candidate for correlation, a retained segment must:

Have a unique identifier
Be a nondynamic object
Be defined as detectable (see following explanation)

Each primitive or group of primitives within a given segment must be capable of maintaining tag information. Tag information is added to an object in response to an application calling GpiSetTag. The pick tag is a positive integer. If 0 is specified as the pick tag, detectability should be turned OFF for subsequent primitives. The pick tag is 0 by default. The tag specified in the most recent call to GpiSetTag() is the current tag, and remains in effect for all subsequent drawing operations until another call to GpiSetTag() is made. The tag is considered to be a part of the current attributes for the segment and, therefore, is affected by the current attribute mode of the segment.

An application can request correlation data for:

Segments that have been defined as both detectable and visible
All nonzero segments that intersect the pick aperture regardless of the object detectability and visibility attributes

The presentation driver returns the names of segments within the pick aperture in reverse order of their occurrence on the segment chain. This data is returned in the form of segment and tag pairs. Each unique segment and tag pair within the pick aperture is termed a correlation hit. If two or more primitives within the current pick aperture have the same tag, they are considered as a single correlation hit. When a called segment is picked , correlation data is also returned for all segments above it in the hierarchy (up to and including the root segment). This also constitutes a single correlation hit.