L_AnnGetRgnHandle

Summary

Creates a region from the specified annotation object and retrieves a handle to that region.

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetRgnHandle(hObject, pXForm, phRgn)

Parameters

HANNOBJECT hObject

Handle to the annotation object from which the region will be created.

pRGNXFORM pXForm

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 TOP_LEFT.

HRGN *phRgn

Address of the variable to be updated with the handle to the region, if the function is successful.

Returns

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

Comments

You can create regions from the following annotation objects:

When working with the RGNXFORM structure in this function, consider the following:

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Topics

Example

L_INT EXT_CALLBACK AnnGetRgnHandleExample(HANNOBJECT hObject, L_VOID* pUserData) 
{ 
   UNREFERENCED_PARAMETER(pUserData); 
 
   L_HRGN   hRgn; 
   RGNXFORM XForm; 
   L_INT    nRet; 
 
   XForm.uViewPerspective = BOTTOM_LEFT; 
   XForm.nXScalarNum = XForm.nXScalarDen = 1; 
   XForm.nYScalarNum = XForm.nYScalarDen = 1; 
   XForm.nXOffset = XForm.nYOffset = 0; 
 
   nRet = L_AnnGetRgnHandle(hObject, &XForm, &hRgn); 
   if (nRet == SUCCESS) 
      _tprintf(_T("%s"), TEXT("Got region handle.")); 
 
   return nRet; 
} 
 
L_INT AnnGetRgnHandleExample_Call(HANNOBJECT hContainer) 
{ 
   return L_AnnEnumerate(hContainer, (ANNENUMCALLBACK)AnnGetRgnHandleExample, NULL, ANNFLAG_SELECTED | ANNFLAG_NOTTHIS, 0); 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

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