GpiSetPickApertureSize: Difference between revisions
Appearance
Created page with "This function sets the pick-aperture size. ==Syntax== <PRE> #define INCL_GPICORRELATION →Or use INCL_GPI, INCL_PM,: #include <os2.h> HPS hps; /* Presentatio..." |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
GpiSetPickApertureSize(hps, lOptions, psizlSize) | |||
==Parameters== | ==Parameters== | ||
; hps (HPS) - input : Presentation-space handle. | ; hps (HPS) - input : Presentation-space handle. | ||
; lOptions (LONG) - input : Setting option. | ; lOptions (LONG) - input : Setting option. | ||
::'''PICKAP_DEFAULT :''' Use the default pick aperture. The value of psizlSize is ignored. | |||
'''PICKAP_DEFAULT :''' Use the default pick aperture. The value of psizlSize is ignored. | ::'''PICKAP_REC :''' Use the values specified by psizlSize. | ||
'''PICKAP_REC :''' Use the values specified by psizlSize . | |||
; psizlSize (PSIZEL) - input : Pick aperture size. | ; psizlSize (PSIZEL) - input : Pick aperture size. | ||
Line 30: | Line 16: | ||
* FALSE Error occurred. | * FALSE Error occurred. | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
; PMERR_INV_HPS (0x207F) : An invalid presentation-space handle was specified. | ; 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_PS_BUSY (0x20F4) : An attempt was made to access the presentation space from more than one thread simultaneously. | ||
; PMERR_INV_PICK_APERTURE_OPTION (0x20B4) : An invalid options parameter was specified with GpiSetPickApertureSize. | ; PMERR_INV_PICK_APERTURE_OPTION (0x20B4) : An invalid options parameter was specified with GpiSetPickApertureSize. | ||
; PMERR_INV_PICK_APERTURE_SIZE (0x20B6) : An invalid size parameter was specified with GpiSetPickApertureSize. | ; PMERR_INV_PICK_APERTURE_SIZE (0x20B6) : An invalid size parameter was specified with GpiSetPickApertureSize. | ||
Line 47: | Line 29: | ||
==Example Code== | ==Example Code== | ||
<PRE> | |||
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */ | |||
#include <os2.h> | |||
HPS hps; /* Presentation-space handle. */ | |||
LONG lOptions; /* Setting option. */ | |||
PSIZEL psizlSize; /* Pick aperture size. */ | |||
BOOL rc; /* Success indicator. */ | |||
rc = GpiSetPickApertureSize(hps, lOptions, psizlSize); | |||
</PRE> | |||
In this example we set the pick-aperture size to a 4 by 4 box in world coordinates. | In this example we set the pick-aperture size to a 4 by 4 box in world coordinates. | ||
<PRE> | <PRE> | ||
Line 57: | Line 50: | ||
sizel.cx = 4L; sizel.cy = 4L; | sizel.cx = 4L; sizel.cy = 4L; | ||
GpiSetQueryPickApertureSize(hps, &sizel); | GpiSetQueryPickApertureSize(hps, &sizel); | ||
</PRE> | </PRE> | ||
Latest revision as of 23:38, 7 April 2025
This function sets the pick-aperture size.
Syntax
GpiSetPickApertureSize(hps, lOptions, psizlSize)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lOptions (LONG) - input
- Setting option.
- PICKAP_DEFAULT : Use the default pick aperture. The value of psizlSize is ignored.
- PICKAP_REC : Use the values specified by psizlSize.
- psizlSize (PSIZEL) - input
- Pick aperture size.
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_PICK_APERTURE_OPTION (0x20B4)
- An invalid options parameter was specified with GpiSetPickApertureSize.
- PMERR_INV_PICK_APERTURE_SIZE (0x20B6)
- An invalid size parameter was specified with GpiSetPickApertureSize.
Remarks
The pick aperture can be set either to the default value, or to a specified size in presentation page space. This is used in any subsequent nonretained or retained correlation operations.
The default size is a rectangle in presentation page space that produces a square on the device, with side equal to the default character cell height.
Example Code
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lOptions; /* Setting option. */ PSIZEL psizlSize; /* Pick aperture size. */ BOOL rc; /* Success indicator. */ rc = GpiSetPickApertureSize(hps, lOptions, psizlSize);
In this example we set the pick-aperture size to a 4 by 4 box in world coordinates.
#define INCL_GPICORRELATION #include <OS2.H> HPS hps; /* Presentation space handle. */ SIZEL sizel; /* Pick-aperture position. */ sizel.cx = 4L; sizel.cy = 4L; GpiSetQueryPickApertureSize(hps, &sizel);