L_AnnGetTag

Summary

Gets the tag of the specified annotation object. You can use this tag to uniquely identify objects when they are saved in a file.

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetTag(hObject, puTag)

Parameters

HANNOBJECT hObject

Handle to the annotation object.

L_UINT32 * puTag

Address of the variable to be updated with the object's tag.

Returns

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

Comments

Before calling this function, you must declare a variable of data type L_UINT32. Then, pass the address of the variable in the puTag parameter. This function will update the variable with the tag of the annotation object.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For a complete sample code, refer to the \Examples\Annotation\C\Annotate demo.
This example shows how an active object’s tag can be used to invoke a particular action.

L_INT AnnGetTagExample(HANNOBJECT hAnnObject) 
{ 
   L_INT    nRet; 
   L_UINT32 ObjectTag;     /* Tag used to identify an object */ 
   L_UINT   ActiveState;   /* Specifies whether the object can be activated */ 
 
   /* Get the tag and the active state */ 
   nRet = L_AnnGetTag(hAnnObject, &ObjectTag); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_AnnGetActiveState(hAnnObject, &ActiveState); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Take an action based on the tag and the active state */ 
   if (ObjectTag == 3) 
      if (ActiveState == ANNACTIVE_ENABLED) 
         _tprintf(_T("Notice: This is what we do for No. 3")); 
 
   return SUCCESS; 
} 

Help Version 22.0.2023.7.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.