L_AnnCopy

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnCopy(hSource, phDest)

Makes a copy of an annotation object.

Parameters

HANNOBJECT hSource

Handle to the annotation object to be copied.

pHANNOBJECT phDest

Address of the HANNOBJECT variable to be updated with the handle of the new annotation object.

Returns

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

Comments

(Document and Medical) Before calling this function, you must declare a variable of data type HANNOBJECT. Then, pass the address of the variable in the phDest parameter. This function will update the variable with the handle of the annotation object created by the copy.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example copies an object and moves the copy so that it can be seen.

L_INT AnnCopyExample(HANNOBJECT   hContainer, 
                                    HANNOBJECT   hAnnObject) 
{ 
   L_INT nRet; 
   HANNOBJECT  NewObject;     /* New object created by copying */ 
   ANNRECT     ContainerRect; /* Rectangle for positioning the new object */ 
 
   /* Copy the incoming object and insert it into the container */ 
   nRet = L_AnnCopy(hAnnObject, &NewObject); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = L_AnnInsert(hContainer, NewObject, FALSE); 
   if(nRet != SUCCESS) 
      return nRet; 
   /* Move the new object down and to the right */ 
   nRet = L_AnnGetRect(hContainer, &ContainerRect, NULL); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = L_AnnMove(NewObject, 
             (ContainerRect.right - ContainerRect.left) / 20, 
             (ContainerRect.bottom - ContainerRect.top) / 20, 
             0);  
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help