Jump to content

GpiOffsetClipRegion

From EDM2
Revision as of 21:53, 6 April 2025 by Iturbide (talk | contribs) (Created page with "This function moves the clipping region by the specified displacement. ==Syntax== GpiOffsetClipRegion(hps, pptlPoint) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; pptlPoint (PPOINTL) - input : Displacement. : The displacement by which the clipping region is to be moved, expressed as an offset in world coordinates. ==Return Value== ; lComplexity (LONG) - returns : Complexity of clipping and error indicators. : The clipping complexity...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function moves the clipping region by the specified displacement.

Syntax

GpiOffsetClipRegion(hps, pptlPoint)

Parameters

hps (HPS) - input
Presentation-space handle.
pptlPoint (PPOINTL) - input
Displacement.
The displacement by which the clipping region is to be moved, expressed as an offset in world coordinates.

Return Value

lComplexity (LONG) - returns
Complexity of clipping and error indicators.
The clipping complexity information includes the combined effects of:
* Clip path
* Viewing limits
* Graphics field
* Clip region
* Visible region (windowing considerations).
The possible values for this parameter are:
RGN_NULL
Null region
RGN_RECT
Rectangular region
RGN_COMPLEX
Complex region
RGN_ERROR
Error.

Remarks

This function must not be used 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_COORDINATE_OVERFLOW (0x2014)
An internal coordinate overflow error occurred. This can occur if coordinates or matrix transformation elements (or both) are invalid or too large.

Example Code

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

HPS     hps;       /* Presentation-space handle. */
PPOINTL pptlPoint; /* Displacement. */
LONG    lComplexity; /* Complexity of clipping and error indicators. */

lComplexity = GpiOffsetClipRegion(hps, pptlPoint);

This example uses GpiOffsetClipRegion to move the clipping region right by 3 and up by 3.

#define INCL_GPIREGIONS /* Region functions */
#include <os2.h>

LONG lComplexity; /* clipping complexity/error return */
HPS hps; /* Presentation-space handle */
POINTL pptlPoint = {3,3}; /* displacement */

lComplexity = GpiOffsetClipRegion(hps, &pptlPoint);

Related Functions