Jump to content

GpiMarker: Difference between revisions

From EDM2
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..."
 
Ak120 (talk | contribs)
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_OK
::GPI_HITS : Correlate hits
:: Successful
::GPI_ERROR : Error.
:; 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==
<PRE>
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS    hps;      /* Presentation-space handle. */
PPOINTL pptlPoint; /* Position of the marker. */
LONG    lHits;    /* Correlation and error indicators. */
lHits = GpiMarker(hps, pptlPoint);
</PRE>
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 &lt;os2.h&gt;
#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

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