L_LTDIS_API L_INT L_GetBitmapRgnHandle(pBitmap, pXForm, phRgn)
Creates a Windows region that is a snapshot of the bitmap region and assigns the handle to a variable that you supply.
Pointer to the bitmap handle referencing the bitmap that has the region.
Pointer to an RGNXFORM structure that LEADTOOLS uses to translate between display coordinates and bitmap coordinates.
If you specify NULL in this parameter, the scalar fields default to 1, the offsets default to 0, and the view perspective defaults to the bitmap's view perspective.
Pointer to the Windows region handle. You do not have to create the region. You just declare the HRGN variable and pass its address.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Before calling this function, you must declare an RGNXFORM structure and set its values, which LEADTOOLS uses to translate between device context coordinates and bitmap coordinates. For details about how the structure works refer to the RGNXFORM structure description. For a description of common usage, refer to Translating Coordinates for a Bitmap Region.
If you want to assign a region from one bitmap to another, you must use the L_GetBitmapRgnHandle function to get region from the first bitmap; then use the L_SetBitmapRgnHandle function to assign the region to the second bitmap.
Because this function updates some members of the BITMAPHANDLE structure, it is not safe to call it from multiple threads using the same
You are responsible for deleting the Windows region to free memory when the region is no longer needed. To do so, use the Windows DeleteObject function. The following is a list of Windows functions that relate to Windows regions:
Required DLLs and Libraries
Win32, x64, Linux.
For an example, refer to L_SetBitmapRgnHandle.
For complete sample code, refer to the DRAW
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries