Jump to content

GpiSetDefArcParams

From EDM2
Revision as of 20:55, 6 April 2025 by Iturbide (talk | contribs) (Created page with "This function specifies the default values of the arc parameters (see GpiSetArcParams). ==Syntax== GpiSetDefArcParams(hps, parcpArcParams) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; parcpArcParams (PARCPARAMS) - input : Default arc parameters. : This structure has four elements p, q, r, and s. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful completion :; FALSE :: Error occurred. ==Remarks== Th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function specifies the default values of the arc parameters (see GpiSetArcParams).

Syntax

GpiSetDefArcParams(hps, parcpArcParams)

Parameters

hps (HPS) - input
Presentation-space handle.
parcpArcParams (PARCPARAMS) - input
Default arc parameters.
This structure has four elements p, q, r, and s.

Return Value

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

Remarks

The arc parameters are reset to their default values at the following times:

The initial default values of the arc parameters, when the presentation space is first created, are : p = 1 r = 0 s = 0 q = 1 The default values can be changed by GpiSetDefArcParams. Changing the default values has an immediate effect on the current arc parameters, if these are currently set to the default value. See GpiSetArcParams for a description of the arc parameters. Note: There are restrictions on the use of this function when creating SAA-conforming metafiles; see "MetaFile Resolutions" in the Presentation Manager Programming Reference for more information.

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

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

HPS         hps;          /* Presentation-space handle. */
PARCPARAMS  parcpArcParams; /* Default arc parameters. */
BOOL        rc;           /* Success indicator. */

rc = GpiSetDefArcParams(hps, parcpArcParams);

This function specifies the default values of the arc parameters (see GpiSetArcParams).

#define INCL_GPIDEFAULTS
#define INCL_GPIPRIMITIVES
#include <OS2.H>

HPS hps; /* Presentation space handle */
ARCPARAMS ArcParams = {10L, /* p */
                         20L, /* q */
                         10L, /* r */
                         30L}; /* l */
/* This structure has four */
/* elements p, q, r, and s. */

GpiSetDefArcParams(hps, &ArcParams);

Related Functions