Jump to content

GpiSetPickApertureSize: Difference between revisions

From EDM2
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..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 16: Line 16:
==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 26:
* 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 57: Line 49:
sizel.cx = 4L; sizel.cy = 4L;
sizel.cx = 4L; sizel.cy = 4L;
GpiSetQueryPickApertureSize(hps, &sizel);
GpiSetQueryPickApertureSize(hps, &sizel);
</PRE>
</PRE>



Revision as of 18:37, 6 January 2023

This function sets the pick-aperture size.

Syntax

#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);

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

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);

Related Functions