GpiMarker
Appearance
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 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
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ PPOINTL pptlPoint; /* Position of the marker. */ LONG lHits; /* Correlation and error indicators. */ lHits = GpiMarker(hps, pptlPoint);
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