GpiSetMarker: Difference between revisions
Appearance
Created page with "This function sets the value of the marker-symbol attribute. ==Syntax== GpiSetMarker(hps, lSymbol) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; lSymbol (LONG) - input : Marker symbol. : The identity of the required marker symbol. Zero selects the default marker symbol, a value in the range 1 through 255 identifies a symbol in the current marker set. Valid values in the default marker set are shown below, these symbols are not necessarily..." |
|||
Line 11: | Line 11: | ||
: Marker symbol. | : Marker symbol. | ||
: The identity of the required marker symbol. Zero selects the default marker symbol, a value in the range 1 through 255 identifies a symbol in the current marker set. Valid values in the default marker set are shown below, these symbols are not necessarily available with other marker sets: | : The identity of the required marker symbol. Zero selects the default marker symbol, a value in the range 1 through 255 identifies a symbol in the current marker set. Valid values in the default marker set are shown below, these symbols are not necessarily available with other marker sets: | ||
[[Image:GpiSetMarker_lSymbol.png]] | |||
==Return Value== | ==Return Value== |
Latest revision as of 18:50, 6 April 2025
This function sets the value of the marker-symbol attribute.
Syntax
GpiSetMarker(hps, lSymbol)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lSymbol (LONG) - input
- Marker symbol.
- The identity of the required marker symbol. Zero selects the default marker symbol, a value in the range 1 through 255 identifies a symbol in the current marker set. Valid values in the default marker set are shown below, these symbols are not necessarily available with other marker sets:
Return Value
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function must not be issued in an area bracket. The default marker-symbol is a cross. This can be changed with GpiSetDefAttrs. The attribute mode (see GpiSetAttrMode) determines whether the current value of the marker attribute is to be preserved.
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_MARKER_SYMBOL_ATTR (0x209A)
- An invalid marker symbol attribute value was specified or the default value was explicitly specified with GpiSetAttrs instead of using the defaults mask.
Graphic Elements and Orders
Element Type: OCODE_GSMT This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE. Order: Set Marker Symbol
Element Type: OCODE_GPSMT This element type is generated if the attribute mode is set to AM_PRESERVE. Order: Push and Set Marker Symbol
Example Code
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lSymbol; /* Marker symbol. */ BOOL rc; /* Success indicator. */ rc = GpiSetMarker(hps, lSymbol);
This function changes the marker from the default (a cross) to a diamond.
#define INCL_GPIPRIMITIVES #include <OS2.H> HPS hps; /* Presentation-space handle. */ GpiSetMarker(hps, MARKSYM_DIAMOND);