Jump to content

GpiSetMarkerBox

From EDM2

This function sets the current marker-box attribute.

Syntax

GpiSetMarkerBox(hps, psizfxSize)

Parameters

hps (HPS) - input
Presentation-space handle.
psizfxSize (PSIZEF) - input
Size of marker box.
The size is specified in world coordinates. The fractional part of the value should be 0.

Return Value

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
Error occurred.

Remarks

The value of the marker-box attribute affects the size of markers that are selected from a vector font only. The size of markers that are selected from an image font is not affected by this attribute. For default markers, this attribute only has an effect if the device supports the scaling of default markers, that is, the CAPS_SCALED_DEFAULT_MARKERS parameter in the CAPS_ADDITIONAL_GRAPHICS element of the device capabilities array returned by the DevQueryCaps function is set to 1. This function must not be issued in an area bracket. The attribute mode (see GpiSetAttrMode) determines whether the current value of the marker-box attribute is preserved. The initial default value of the marker box is the size returned by DevQueryCaps (CAPS_MARKER_WIDTH and CAPS_MARKER_HEIGHT), for the currently associated device, converted to presentation page space. The default value can be changed with GpiSetDefAttrs.

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.

Graphic Elements and Orders

Element Type: OCODE_GSMC This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE. Order: Set Marker Cell

Element Type: OCODE_GPSMC This element type is generated if the attribute mode is set to AM_PRESERVE. Order: Push and Set Marker Cell

Example Code

#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>

HPS     hps;        /* Presentation-space handle. */
PSIZEF  psizfxSize; /* Size of marker box. */
BOOL    rc;         /* Success indicator. */

rc = GpiSetMarkerBox(hps, psizfxSize);

This function sets the marker box to 10x10.

#define INCL_GPIPRIMITIVES
#include <OS2.H>

HPS hps; /* Presentation-space handle. */
SIZEF fxSize = {MAKEFIXED(10,0), MAKEFIXED(10,0)}; /* The size is specified in world coordinates. The fractional part of the value should be zero. */

GpiSetMarkerBox(hps, &fxSize);

Related Functions