L_AnnCopy

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnCopy(hSource, phDest)

HANNOBJECT hSource;

handle to the annotation object to be copied

pHANNOBJECT phDest;

address of the HANNOBJECT variable to be updated

Makes a copy of an annotation object.

Parameter

Description

hSource

Handle to the annotation object to be copied.

phDest

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

Returns

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

LTANN

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

Platforms

Win32, x64.

See Also

Functions:

L_AnnCopyFromClipboard, L_AnnCopyToClipboard, L_AnnCutToClipboard, L_AnnClipboardReady

Topics:

Annotation Functions: Creating and Deleting Annotations

Implementing Annotations

Implementing an Automated Annotation Program

Implementing a Non-automated Annotation Program

 

Using Rulers in Annotation Objects

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help