Jump to content

GpiQueryPickAperturePosition: Difference between revisions

From EDM2
Ak120 (talk | contribs)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This function returns the position of the centre of the pick aperture.
This function returns the position of the center of the pick aperture.


==Syntax==
==Syntax==
<pre>
GpiQueryPickAperturePosition(hps, pptlPoint);
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>
 
HPS hps; /* Presentation-space handle. */
PPOINTL pptlPoint; /* Pick-aperture position. */
BOOL rc; /* Success indicator. */
 
rc = GpiQueryPickAperturePosition(hps, pptlPoint);
 
</pre>


==Parameters==
==Parameters==
; hps (HPS) - input : Presentation-space handle.
;hps (HPS) - input : Presentation-space handle.
 
;pptlPoint (PPOINTL) - output : Pick-aperture position.
; pptlPoint (PPOINTL) - output : Pick-aperture position.
:Position of the centre of the pick aperture, in presentation-page coordinates.
Position of the center of the pick aperture, 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.


===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_DC_TYPE (0x2060) : An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.
; PMERR_INV_DC_TYPE (0x2060) : An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.
==Remarks==


==Example Code==
==Example Code==
In this example we query the position of the center of the pick aperture.
In this example we query the position of the centre of the pick aperture.
<pre>
<pre>
#define INCL_GPICORELATION
#define INCL_GPICORELATION
Line 54: Line 35:


==Related Functions==
==Related Functions==
* [[GpiQueryPickAperturePosition]]
* [[GpiQueryPickApertureSize]]
* [[GpiQueryPickApertureSize]]
* [[GpiSetPickAperturePosition]]
* [[GpiSetPickAperturePosition]]


[[Category:GPI]]
[[Category:Gpi]]

Latest revision as of 01:11, 13 June 2019

This function returns the position of the centre of the pick aperture.

Syntax

GpiQueryPickAperturePosition(hps, pptlPoint);

Parameters

hps (HPS) - input
Presentation-space handle.
pptlPoint (PPOINTL) - output
Pick-aperture position.
Position of the centre of the pick aperture, 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_DC_TYPE (0x2060)
An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.

Example Code

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

#define INCL_GPICORELATION
#include <OS2.H>

BOOL flResult;
HPS hps; /* Presentation space handle. */
POINTL ptlRefPoint; /* Pick-aperture position. */
LONG xcoord, ycoord;
flResult = GpiPickAperturePosition(hps, &ptlRefPoint);
xcoord = ptlRefPoint.x; ycoord = ptlRefPoint.y;

Related Functions