GpiOffsetClipRegion: Difference between revisions
Appearance
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..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | ; pptlPoint ([[PPOINTL]]) - input: Displacement. | ||
; pptlPoint ([[PPOINTL]]) - input | |||
: Displacement. | |||
: The displacement by which the clipping region is to be moved, expressed as an offset in world coordinates. | : The displacement by which the clipping region is to be moved, expressed as an offset in world coordinates. | ||
==Return Value== | ==Return Value== | ||
; lComplexity ([[LONG]]) - returns | ; lComplexity ([[LONG]]) - returns: Complexity of clipping and error indicators. | ||
: Complexity of clipping and error indicators. | |||
: The clipping complexity information includes the combined effects of: | : The clipping complexity information includes the combined effects of: | ||
: * Clip path | :* Clip path | ||
: * Viewing limits | :* Viewing limits | ||
: * Graphics field | :* Graphics field | ||
: * Clip region | :* Clip region | ||
: * Visible region (windowing considerations). | :* Visible region (windowing considerations). | ||
: The possible values for this parameter are: | :The possible values for this parameter are: | ||
: | ::RGN_NULL : Null region | ||
::RGN_RECT : Rectangular region | |||
: | ::RGN_COMPLEX : Complex region | ||
::RGN_ERROR : Error. | |||
: | |||
: | |||
==Remarks== | ==Remarks== | ||
| Line 36: | Line 28: | ||
==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_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. | ||
: 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== | ==Example Code== | ||
This example uses GpiOffsetClipRegion to move the clipping region right by 3 and up by 3. | This example uses GpiOffsetClipRegion to move the clipping region right by 3 and up by 3. | ||
<pre> | <pre> | ||
#define INCL_GPIREGIONS /* Region functions */ | #define INCL_GPIREGIONS /* Region functions */ | ||
#include | #include <os2.h> | ||
LONG lComplexity; /* clipping complexity/error return */ | LONG lComplexity; /* clipping complexity/error return */ | ||
HPS hps; /* Presentation-space handle */ | HPS hps; /* Presentation-space handle */ | ||
POINTL pptlPoint = {3,3}; /* displacement */ | POINTL pptlPoint = {3,3}; /* displacement */ | ||
Latest revision as of 21:39, 17 November 2025
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
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);