GpiMarker: Difference between revisions
Appearance
Created page with "This function draws a marker with its center at a specified position. ==Syntax== GpiMarker(hps, pptlPoint) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; pptlPoint (PPOINTL) - input : Position of the marker. ==Return Value== ; lHits (LONG) - returns : Correlation and error indicators. :; GPI_OK :: Successful :; GPI_HITS :: Correlate hits :; GPI_ERROR :: Error. ==Remarks== The current position is moved to the specified position. The ma..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | ; pptlPoint ([[PPOINTL]]) - input: Position of the marker. | ||
; pptlPoint ([[PPOINTL]]) - input | |||
: Position of the marker. | |||
==Return Value== | ==Return Value== | ||
; lHits ([[LONG]]) - returns | ; lHits ([[LONG]]) - returns: Correlation and error indicators. | ||
: Correlation and error indicators. | ::GPI_OK : Successful | ||
: | ::GPI_HITS : Correlate hits | ||
::GPI_ERROR : Error. | |||
: | |||
: | |||
==Remarks== | ==Remarks== | ||
| Line 26: | Line 19: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError: | Possible returns from WinGetLastError: | ||
; PMERR_INV_HPS (0x207F) | ; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified. | ||
: 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) | ; PMERR_INV_COORDINATE (0x205B): An invalid coordinate value was specified. | ||
: 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== | ==Example Code== | ||
This example uses the GpiMarker function to draw a marker at the point (10,10). | This example uses the GpiMarker function to draw a marker at the point (10,10). | ||
<pre> | <pre> | ||
#define INCL_GPIPRIMITIVES /* GPI primitive functions */ | #define INCL_GPIPRIMITIVES /* GPI primitive functions */ | ||
#include | #include <os2.h> | ||
HPS hps; /* presentation space handle */ | HPS hps; /* presentation space handle */ | ||
Revision as of 20:20, 17 November 2025
This function draws a marker with its center at a specified position.
Syntax
GpiMarker(hps, pptlPoint)
Parameters
Return Value
- lHits (LONG) - returns
- Correlation and error indicators.
- GPI_OK : Successful
- GPI_HITS : Correlate hits
- GPI_ERROR : Error.
Remarks
The current position is moved to the specified position. The marker symbol is selected by the current values of the marker set and marker symbol attributes.
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
This example uses the GpiMarker function to draw a marker at the point (10,10).
#define INCL_GPIPRIMITIVES /* GPI primitive functions */
#include <os2.h>
HPS hps; /* presentation space handle */
POINTL ptl = { 10, 10 }; /* marker point */
GpiMarker(hps, &ptl);
Graphic Elements and Orders
Element Type: OCODE_GMRK Note that GpiPolyMarker also generates this element type. Order: Marker at Given Position