Jump to content

GreOffsetClipRegion: Difference between revisions

From EDM2
Created page with "GreOffsetClipRegion moves the clipping region by the specified amount. This function is supported by the graphics engine and can be hooked by the presentation driver. ;Sim..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreOffsetClipRegion moves the clipping region by the specified amount.  
GreOffsetClipRegion moves the clipping region by the specified amount.


This function is supported by the graphics engine and can be hooked by the presentation driver.  
This function is supported by the graphics engine and can be hooked by the presentation driver.


;Simulation support: This function is simulated by a handling routine in the graphics engine.
;Simulation support: This function is simulated by a handling routine in the graphics engine.


==Syntax==
==Syntax==
  GreOffsetClipRegion(hdc, pdpt, pInstance, lFunction);
  GreOffsetClipRegion(hdc, pdpt, pInstance, lFunction)


==Parameters==
==Parameters==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;pdpt (P[[POINTL]]) - input:Pointer to offset by which the clipping region is to be moved, in world coordinates:
 
:* dx X offset
;pdpt (PPOINTL) - input  
:* dy Y offset
:Pointer to offset.
;pInstance (PVOID) - input:Pointer to instance data.
:Pointer to offset by which the clipping region is to be moved, in world coordinates:  
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreOffsetClipRegion.
 
:* dx X offset  
:* dy Y offset  
 
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreOffsetClipRegion.  


==Return Code==
==Return Code==
;rc (LONG) - returns  
;rc (LONG) - returns:Return codes.
:Return codes.  
:This function returns an integer (lComplexity) indicating the complexity of the region:
 
:*RGN_ERROR Error
:This function returns an integer (lComplexity) indicating the complexity of the region:  
:*RGN_NULL Null region
 
:*RGN_RECT Rectangular region
:*RGN_ERROR Error  
:*RGN_COMPLEX Complex region (more than 1 rectangle)
:*RGN_NULL Null region  
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition.
:*RGN_RECT Rectangular region  
:Error codes for conditions that the handling routine is expected to check include:
:*RGN_COMPLEX Complex region (more than 1 rectangle)  
:*PMERR_COORDINATE_OVERFLOW
 
:*PMERR_DEV_FUNC_NOT_INSTALLED
:Possible Errors Detected:   When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. :Error codes for conditions that the handling routine is expected to check include:  
:*PMERR_HDC_BUSY
 
:*PMERR_INSUFFICIENT_MEMORY
:*PMERR_COORDINATE_OVERFLOW  
:*PMERR_INV_COORD_OFFSET
:*PMERR_DEV_FUNC_NOT_INSTALLED  
:*PMERR_INV_COORD_SPACE
:*PMERR_HDC_BUSY  
:*PMERR_INV_COORDINATE
:*PMERR_INSUFFICIENT_MEMORY  
:*PMERR_INV_HDC
:*PMERR_INV_COORD_OFFSET  
:*PMERR_INV_HRGN
:*PMERR_INV_COORD_SPACE  
:*PMERR_INV_IN_AREA
:*PMERR_INV_COORDINATE  
:*PMERR_INV_IN_PATH
:*PMERR_INV_HDC  
:*PMERR_INV_LENGTH_OR_COUNT
:*PMERR_INV_HRGN  
:*PMERR_INV_RECT
:*PMERR_INV_IN_AREA  
:*PMERR_INV_REGION_CONTROL
:*PMERR_INV_IN_PATH  
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation.
:*PMERR_INV_LENGTH_OR_COUNT  
:*PMERR_INV_RECT  
:*PMERR_INV_REGION_CONTROL  
 
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.  


==Remarks==
==Remarks==
The value returned is the complexity of the resultant DC region, that is, the intersection of all clipping (such as clip path, viewing limits, graphics field, clip region, and visible region).  
The value returned is the complexity of the resultant DC region, that is, the intersection of all clipping (such as clip path, viewing limits, graphics field, clip region, and visible region).


==Sample Code==
==Sample Code==
Line 63: Line 49:
#include <os2.h>
#include <os2.h>


HDC        hdc;        /* Device context handle. */
HDC        hdc;        /* Device context handle. */
PPOINTL    pdpt;      /* Pointer to offset. */
PPOINTL    pdpt;      /* Pointer to offset. */
PVOID      pInstance;  /* Pointer to instance data. */
PVOID      pInstance;  /* Pointer to instance data. */
ULONG      lFunction;  /* High-order WORD=flags; low-order WORD=NGreOffsetClipRegion. */
ULONG      lFunction;  /* High-order WORD=flags; low-order WORD=NGreOffsetClipRegion. */
LONG      rc;        /* Return codes. */
LONG      rc;        /* Return codes. */
 
rc = GreOffsetClipRegion(hdc, pdpt, pInstance,
      lFunction);


rc = GreOffsetClipRegion(hdc, pdpt, pInstance, lFunction);
</PRE>
</PRE>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 17:39, 7 February 2020

GreOffsetClipRegion moves the clipping region by the specified amount.

This function is supported by the graphics engine and can be hooked by the presentation driver.

Simulation support
This function is simulated by a handling routine in the graphics engine.

Syntax

GreOffsetClipRegion(hdc, pdpt, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
pdpt (PPOINTL) - input
Pointer to offset by which the clipping region is to be moved, in world coordinates:
  • dx X offset
  • dy Y offset
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreOffsetClipRegion.

Return Code

rc (LONG) - returns
Return codes.
This function returns an integer (lComplexity) indicating the complexity of the region:
  • RGN_ERROR Error
  • RGN_NULL Null region
  • RGN_RECT Rectangular region
  • RGN_COMPLEX Complex region (more than 1 rectangle)
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition.
Error codes for conditions that the handling routine is expected to check include:
  • PMERR_COORDINATE_OVERFLOW
  • PMERR_DEV_FUNC_NOT_INSTALLED
  • PMERR_HDC_BUSY
  • PMERR_INSUFFICIENT_MEMORY
  • PMERR_INV_COORD_OFFSET
  • PMERR_INV_COORD_SPACE
  • PMERR_INV_COORDINATE
  • PMERR_INV_HDC
  • PMERR_INV_HRGN
  • PMERR_INV_IN_AREA
  • PMERR_INV_IN_PATH
  • PMERR_INV_LENGTH_OR_COUNT
  • PMERR_INV_RECT
  • PMERR_INV_REGION_CONTROL
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Remarks

The value returned is the complexity of the resultant DC region, that is, the intersection of all clipping (such as clip path, viewing limits, graphics field, clip region, and visible region).

Sample Code

#define INCL_GRE_CLIP
#include <os2.h>

HDC        hdc;        /* Device context handle. */
PPOINTL    pdpt;       /* Pointer to offset. */
PVOID      pInstance;  /* Pointer to instance data. */
ULONG      lFunction;  /* High-order WORD=flags; low-order WORD=NGreOffsetClipRegion. */
LONG       rc;         /* Return codes. */

rc = GreOffsetClipRegion(hdc, pdpt, pInstance, lFunction);