Jump to content

GpiMarker: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
Line 26: Line 26:
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 <os2.h>
#include <os2.h>


HPS hps; /* presentation space handle */
HPS hps;                   /* presentation space handle           */
POINTL ptl = { 10, 10 }; /* marker point */
POINTL ptl = { 10, 10 };   /* marker point                       */


GpiMarker(hps, &ptl);
GpiMarker(hps, &ptl);

Latest revision as of 15:36, 24 November 2025

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