LRasterPaint::GetClipRgn

Summary

Gets the current clipping region, set using the LRasterPaint::SetClipRgn function.

Syntax

#include "Ltwrappr.h"

L_INT LRasterPaint::GetClipRgn(phClipRgn)

Parameters

pHRGN phClipRgn

Pointer to a Windows region handle to be updated with the current clipping region.

Returns

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

Comments

The phClipRgn parameter is updated with a windows region, which is a snapshot of the current clipping region, used by the toolkit. The user is responsible for deleting this region.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LRasterPaint_GetClipRgnExample( LRasterPaint*  pRstp ) 
{ 
   L_INT    nRet; 
   HRGN     hRgn, hClipRgn ; 
 
   /* create some region */ 
   hRgn = CreateRectRgn ( 0, 0, 100, 100 ) ; 
 
   /* get the current painting tools clip region */ 
   nRet = pRstp->GetClipRgn ( &hClipRgn ) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* combine the regions */ 
   CombineRgn ( hRgn, hClipRgn, hRgn, RGN_OR ) ; 
 
   /* set the painting tools new clip region */ 
   nRet = pRstp->SetClipRgn ( hRgn ) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* delete the regions */ 
   DeleteObject ( ( HRGN ) hRgn ) ; 
   DeleteObject ( ( HRGN ) hClipRgn ) ; 
 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.