GpiSetGraphicsField

This function sets the size and position of the graphics field in presentation page units.

Syntax
GpiSetGraphicsField (hps, prclField)

Parameters

 * hps (HPS) - input : Presentation-space handle.
 * prclField (PRECTL) - input : Graphics field.
 * It is an error if the top coordinate is less than the bottom, or the right coordinate is less than the left.
 * All values are in presentation-page units.

Return Code

 * rc (BOOL) - returns : Success indicator.
 * TRUE Successful completion
 * FALSE Error occurred.

Errors
Possible returns from WinGetLastError:


 * PMERR_INV_HPS (0x207F) : An invalid presentation-space handle was specified.
 * PMERR_PS_BUSY (0x20F4) : An attempt was made to access the presentation space from more than one thread simultaneously.
 * PMERR_INV_GRAPHICS_FIELD (0x207A) : An invalid field parameter was specified with GpiSetGraphicsField.
 * PMERR_INV_COORDINATE (0x205B) : An invalid coordinate value was specified.

Remarks
The graphics field specifies a clipping boundary within the presentation page.

The boundaries are inclusive, so that points on them are not clipped (removed). By default, no clipping is performed.

Note: There are restrictions on the use of this function when creating SAA-conforming metafiles; see "MetaFile Resolutions" in the Presentation Manager Programming Reference for more information.

Example Code
This example sets the graphics field to 400x400 with the left bottom corner at (25,25). 
 * 1) define INCL_GPITRANSFORMS
 * 2) include 

HPS hps;   /* Presentation-space */ /* handle. */

RECTL rclField = {25, /* x coordinate of left-hand edge of */ /* rectangle. */                 25, /* y coordinate of bottom edge of */ /* rectangle. */                 425,/* x coordinate of right-hand edge of */ /* rectangle. */                 425};/* y coordinate of top edge of rectangle. */

GpiSetGraphicsField(hps, &rclField); 

Related Functions

 * GpiExcludeClipRectangle
 * GpiIntersectClipRectangle
 * GpiOffsetClipRegion
 * GpiQueryClipBox
 * GpiQueryClipRegion
 * GpiQueryDefViewingLimits
 * GpiQueryGraphicsField
 * GpiQueryViewingLimits
 * GpiSetClipPath
 * GpiSetClipRegion
 * GpiSetDefViewingLimits
 * GpiSetViewingLimits