Jump to content

GpiSetPickAperturePosition: Difference between revisions

From EDM2
Created page with "This function sets the center of the pick aperture, in presentation page space, for subsequent nonretained correlation operations. ==Syntax== <PRE> #define INCL_GPICORRELATIO..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


==Syntax==
==Syntax==
<PRE>
GpiSetPickAperturePosition(hps, pptlPick)
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>


HPS hps;            /* Presentation-space handle. */
PPOINTL pptlPick;  /* Center of the pick aperture. */
BOOL rc;            /* Success indicator. */
rc = GpiSetPickAperturePosition(hps, pptlPick);
</PRE>
==Parameters==
==Parameters==
; hps (HPS) - input : Presentation-space handle.
;hps (HPS) - input : Presentation-space handle.
 
;pptlPick (PPOINTL) - input : Center of the pick aperture.
; pptlPick (PPOINTL) - input : Center of the pick aperture.
:The center is in presentation page coordinates.
The center is in presentation page coordinates.


==Return Code==
==Return Code==
; rc (BOOL) - returns : Success indicator.  
;rc (BOOL) - returns : Success indicator.
* TRUE Successful completion
* TRUE Successful completion
* FALSE Error occurred.
* FALSE Error occurred.
Line 25: Line 16:
==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_COORDINATE (0x205B) : An invalid coordinate value was specified.
; PMERR_INV_COORDINATE (0x205B) : An invalid coordinate value was specified.
 
==Remarks==


==Example Code==
==Example Code==
Line 39: Line 27:


BOOL flResult;
BOOL flResult;
HPS hps;                         /* Presentation space handle. */
HPS hps;                         /* Presentation space handle. */
POINTL ptlPoint = {50L, 50L};     /* Pick-aperture position. */
POINTL ptlPoint = {50L, 50L};   /* Pick-aperture position. */


flResult = GpiSetPickAperturePosition(hps, &ptlPoint);
flResult = GpiSetPickAperturePosition(hps, &ptlPoint);

Latest revision as of 06:56, 14 February 2020

This function sets the center of the pick aperture, in presentation page space, for subsequent nonretained correlation operations.

Syntax

GpiSetPickAperturePosition(hps, pptlPick)

Parameters

hps (HPS) - input
Presentation-space handle.
pptlPick (PPOINTL) - input
Center of the pick aperture.
The center is in presentation page coordinates.

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_COORDINATE (0x205B)
An invalid coordinate value was specified.

Example Code

In this example we query the position of the center of the pick aperture.

#define INCL_GPICORELATION
#include <OS2.H>

BOOL flResult;
HPS hps;                         /* Presentation space handle. */
POINTL ptlPoint = {50L, 50L};    /* Pick-aperture position. */

flResult = GpiSetPickAperturePosition(hps, &ptlPoint);

Related Functions