L_PntOffsetClipRgn

Summary

Offsets the paint-clipping region of the device context (DC) and the bitmap.

Syntax

#include "LtPnt.h"

L_LTPNT_API L_INT L_PntOffsetClipRgn(pPaint, nDX, nDY)

Parameters

pPAINTHANDLE pPaint

Pointer to a paint handle.

L_INT nDX

The offset in the horizontal direction.

L_INT nDY

The offset in the vertical direction.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The toolkit will perform the necessary transformations to the offset values, using the current painting transformation values set by calling L_PntSetTransformation. Therefore, the user should provide the offset values without any transformations.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT PntOffsetClipRgnExample(pPAINTHANDLE pPaint) 
{ 
   L_INT nRet; 
   HRGN hRgn ; 
 
   /* create some region */ 
   hRgn = CreateRectRgn ( 0, 0, 100, 100 ) ; 
 
   /* Initiate the Paint toolkit */ 
   nRet = L_PntInit ( &pPaint ); 
   if ( SUCCESS != nRet) 
   { 
      return nRet; 
   } 
 
   /* set the painting tools new DC clip region */ 
   nRet = L_PntSetClipRgn ( pPaint, hRgn) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* offset the current painting tools clipping region */ 
   /*  using the current transformatoin settings */ 
   nRet = L_PntOffsetClipRgn ( pPaint, 10, 10) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* delete the regions */ 
   DeleteObject ( ( HRGN ) hRgn ) ; 
   return SUCCESS; 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Digital Paint C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.