Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiSetViewingLimits (1.2)
◄Function Group► ◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPITRANSFORMS
BOOL GpiSetViewingLimits(hps, prclLimits)
HPS hps; /* presentation-space handle */
PRECTL prclLimits; /* address of structure with viewing limits */
The GpiSetViewingLimits function sets the viewing limits. The viewing limits
specify a rectangle in model space that the system uses to clip output. The
viewing limits include all points inside the rectangle and all points on the
left and bottom edges, but do not include points on the right and top edges.
Points on these edges are clipped.
The GpiSetViewingLimits function can be used in a segment to set the viewing
limits for subsequent primitives in the segment. The viewing limits also
apply to any called segments, unless the called segment itself sets the
viewing limits.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
prclLimits Points to the RECTL structure that contains the coordinates of
the viewing limits.
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurs.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
PMERR_INV_COORDINATE
PMERR_INV_HPS
PMERR_INV_VIEWING_LIMITS
PMERR_PS_BUSY
Comments
Unless the segments in the picture chain have the fast-chaining attribute,
the system resets the default viewing limits when each segment in the chain
is drawn. The default viewing limits include all model space──that is,
nothing is clipped.
The segment and model transformations do not affect the viewing limits, but
the viewing limits are affected by the current viewing and default viewing
transformations.
If either the left boundary is greater than the right or the bottom boundary
is greater than the top, a null rectangle is defined, and all points are
clipped.
See Also
GpiQueryViewingLimits, GpiSetAttrMode, RECTL
♦