Jump to content

GpiMarker

From EDM2
Revision as of 20:20, 17 November 2025 by Ak120 (talk | contribs)

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

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

Related Functions