Segment Transformations

The segment transformation provides a way of defining the model transformation drawing attribute at the start of a retained segment. The attribute can subsequently be updated by the model transform orders within the segment. A segment transformation can be applied only to a retained segment.

Segment transformations alter retained-drawing output. Unlike a model transformation, which can be set and reset within a segment bracket, a segment transformation must be set outside of a segment bracket.

An application can determine the values for the current segment transformation by calling GpiQuerySegmentTransformMatrix, which returns the model transformation's scaling, rotation, and translation values in a one-dimensional array representing elements in the MATRIXLF structure.

To apply a segment transformation, applications use GpiSetSegmentTransformMatrix. GpiSetSegmentTransformMatrix can be used to apply any sort of transformation to a segment. For example, it can be used to translate a dynamic segment from one screen position to another, when movement is requested by the user. The application could perform the following steps, for example, on receipt of a WM_MOUSEMOVE message:


[Back: Model Transformations]
[Next: Instance Transformations]