void PEXOCCSetGlobalTransform(
PEXOCC context,
PEXMatrix transform,
PEXMatrixHints hints
)
void PEXSetGlobalTransform(
Display *display,
XID resource_id,
PEXOCRequestType req_type,
PEXMatrix transform
)
- 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).
- transform
- The new global transformation matrix.
- hints
- Hints for the new global transformation matrix.
(PEXMHNone, PEXMHIdentity, PEXMHTranslation,
PEXMHRotation, PEXMHReflection,
PEXMHUniformScale,
PEXMHNonUniformScale, PEXMHShear,
PEXMHPerspProjective,
PEXMHNonPerspProjective,
PEXMH3DTo2DParProjection,
PEXMH3DTo2DPerspProjection,
PEXMHZero, PEXMHSingularUnknown,
PEXMHNonSingularUnknown).
Available only in the OCC form of the function.
None.
Invoke PEXOCCSetGlobalTransform to create an
attribute output command which replaces the current global
transformation matrix with the specified matrix in the
renderer's pipeline state.
The PEXOCCSetGlobalTransform function generates
a PEXOCGlobalTransformWithHints output command.
However, if the PEX server on the display
connection is version 5.1 or the
Alternate Protocol Level
is 5.1, then this function genrates a
PEXOCGlobalTransform output command, ignoring
any supplied hint.
The PEXSetGlobalTransform
function generates a PEXOCGlobalTransform
output command.
This function stores the matrix in row-major order.
PEXlib defines the following matrix hints
(hints): (5.2)
- PEXMHNone -
- indicates that there is no additional information about the
contents of the matrix.
- PEXMHIdentity -
- indicates that the matrix contains:

- PEXMHTranslation -
- indicates that the matrix is non-singular, affine,
angle-preserving, Euclidean, and of one of the following
forms, or a product of these forms. The fourth column
in the fourth row is one:

- PEXMHRotation -
- indicates that the matrix is non-singular, affine,
angle-preserving, Euclidean and of one of the following
forms, or a product
of these forms.
The fourth column in the fourth row is one:

- PEXMHReflection
- indicates that the matrix is a non-singular, affine,
angle-preserving, Euclidean transform with a negative
determinant.
The fourth column in the fourth row is one:

- PEXMHUniformScale -
- indicates that the matrix is non-singular, affine,
angle-preserving.
The fourth column in the fourth row is one:

- PEXMHNonUniformScale -
- indicates that the matrix is non-singular, affine.
and of one of the following forms, or a product of
these forms.
The fourth column in the fourth row is one:

- PEXMHShear -
- indicates that the matrix is non-singular, affine, and
of one of the following forms, or a product of these forms.
The fourth column in the fourth row is one:

- PEXMHPerspProjective -
- indicates that the matrix is 3D to 3D projective,
non-singular, non-affine, and of one of the following forms,
or a product of these forms. All columns and rows have
at least one non-zero value.
One of the first three columns in the fourth row is non-zero
(r!=0). The fourth column of the fourth row is one:

- PEXMHNonPerspProjective -
- indicates that the matrix is 3D to 3D projective,
non-singular, non-affine.
All columns and rows have at least one non-zero value.
The fourth column of the fourth row is not equal to zero or
one.

- PEXMH3DTo2DParProjection -
- indicates that the matrix is singular, affine.
One of the first three rows is all zeros.
All of the first three columns in the fourth row are zero.
The fourth column in the fourth row is one.
Examples:

- PEXMH3DTo2DParProjection -
- indicates that the matrix is singular, non-affine.
One of the first three rows is all zeros.
The corresponding column of the fourth row is non-zero
(r != 0).
The fourth column in the fourth row is one.
Examples:

- PEXMHZero -
- indicates that the matrix is composed of all zero
entries:

- PEXMHSingularUnknown -
- indicates that the matrix has a zero determinant.
No other information is available.
- PEXMHNonSingularUnknown -
- indicates that the matrix has a non-zero determinant.
No other information is available.
You may supply more
than one matrix hint by or'ing them together.
For example, if you form a composite matrix transform
by multiplying a translation matrix and a rotation
matrix together, or by simply forming one manually
or with a utility, the hint is the logical OR of
PEXMHTranslation and PEXMHRotation.
If you provide undefined hints or hints which do not accurately
describe the matrix, then the result is
implementation-dependent.
If you do not provide any matrix hints by using the
PEXSetGlobalTransform (non-OCC) function,
then the implementation assumes the hint is PEXMHNone.
The non-OCC version of the interface does not support the
hints argument, for backwards compatibility with previous
versions of PEXlib.
The implementation is not required to
utilize the hints and may therefore set the pipeline state's
global transform hint to PEXMHNone.
This function
is a member of the
global attribute set.
- BadPEXRenderer
- The specified renderer resource identifier is invalid.
- BadPEXStructure
- The specified structure resource identifier is invalid.
For an overview and for a list of output attribute functions, see
Output Attribute Functions.