GpiPolyMarker
Appearance
This function draws markers with their centers at each of a series of specified positions.
Syntax
GpiPolyMarker(hps, lCount, aptlPoints)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lCount (LONG) - input
- Number of points.
- Must not be negative. Zero is valid but causes no output.
- aptlPoints (PPOINTL) - input
- Array of points.
- A marker is drawn at each of these points.
Return Value
- lHits (LONG) - returns
- Correlation and error indicators.
- GPI_OK
- Successful
- GPI_HITS
- Correlate hits
- GPI_ERROR
- Error.
Remarks
On completion, the current position is set to the position of the last marker in the series. 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_LENGTH_OR_COUNT (0x2092)
- An invalid length or count parameter was specified.
- 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. */ LONG lCount; /* Number of points. */ PPOINTL aptlPoints; /* Array of points. */ LONG lHits; /* Correlation and error indicators. */ lHits = GpiPolyMarker(hps, lCount, aptlPoints);
This example uses the GpiPolyMarker function to draw a series of markers. It then uses the GpiPolyLine function to connect to markers with lines.
#define INCL_GPIPRIMITIVES /* GPI primitive functions */ #include <os2.h> HPS hps; /* presentation space handle */ POINTL ptlStart = { 0, 0 }; /* start point */ POINTL aptl[5]={10, 8, 20, 17, 30, 28, 40, 51, 50, 46};/* points*/ GpiPolyMarker(hps, 5L, aptl); GpiMove(hps, &ptlStart); GpiPolyLine(hps, 5L, aptl);
Graphic Elements and Orders
Element Type: OCODE_GMRK Note that GpiMarker also generates this element type. Order: Marker at Given Position As many of these orders are generated as is necessary to hold the specified positions.