GpiSetGraphicsField: Difference between revisions
Appearance
Created page with "This function sets the size and position of the graphics field in presentation page units. ==Syntax== <PRE> #define INCL_GPITRANSFORMS →Or use INCL_GPI, INCL_PM,: #includ..." |
mNo edit summary |
||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
GpiSetGraphicsField (hps, prclField) | |||
==Parameters== | ==Parameters== | ||
; hps (HPS) - input : Presentation-space handle. | ;hps (HPS) - input : Presentation-space handle. | ||
;prclField (PRECTL) - input : Graphics field. | |||
; 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. | ||
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. | ||
All values are in presentation-page units. | |||
==Return Code== | ==Return Code== | ||
Line 26: | Line 16: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError: | ||
; PMERR_INV_COORDINATE (0x205B) : | ; PMERR_INV_HPS (0x207F) : An invalid presentation-space handle was specified. | ||
An invalid coordinate value 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== | ==Remarks== | ||
Line 69: | Line 52: | ||
==Related Functions== | ==Related Functions== | ||
* | *GpiExcludeClipRectangle | ||
* | *GpiIntersectClipRectangle | ||
* | *GpiOffsetClipRegion | ||
* | *GpiQueryClipBox | ||
* | *GpiQueryClipRegion | ||
* [[GpiQueryDefViewingLimits]] | *[[GpiQueryDefViewingLimits]] | ||
* [[GpiQueryGraphicsField]] | *[[GpiQueryGraphicsField]] | ||
* [[GpiQueryViewingLimits]] | *[[GpiQueryViewingLimits]] | ||
* | *GpiSetClipPath | ||
* | *GpiSetClipRegion | ||
* [[GpiSetDefViewingLimits]] | *[[GpiSetDefViewingLimits]] | ||
* [[GpiSetViewingLimits]] | *[[GpiSetViewingLimits]] | ||
[[Category:Gpi]] | [[Category:Gpi]] |
Revision as of 18:31, 25 February 2017
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).
#define INCL_GPITRANSFORMS #include <OS2.H> 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