LRasterPaint::GetClipRgn

#include "Ltwrappr.h"

L_INT LRasterPaint::GetClipRgn(phClipRgn)

pHRGN phClipRgn;

/* pointer to a Windows region handle */

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

Parameter

Description

phClipRgn

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

Returns

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

LTPNT

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LRasterPaint::SetClipRgn, LRasterPaint::OffsetClipRgn, Class Members

Topics:

Setting a DigitalPaint Clipping Region

Example

L_VOID GetClipRgnTest ( LRasterPaint*  pRstp )
{
   HRGN hRgn, hClipRgn ;

   /* create some region */
   hRgn = CreateRectRgn ( 0, 0, 100, 100 ) ;

   /* get the current painting tools clip region */
   pRstp->GetClipRgn ( &hClipRgn ) ;

   /* combine the regions */
   CombineRgn ( hRgn, hClipRgn, hRgn, RGN_OR ) ;

   /* set the painting tools new clip region */
   pRstp->SetClipRgn ( hRgn ) ;

   /* delete the regions */
   DeleteObject ( ( HRGN ) hRgn ) ;
   DeleteObject ( ( HRGN ) hClipRgn ) ;
}