L_AnnUnrealize

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnUnrealize(pBitmap, prcBounds, hObject, fSelected)

pBITMAPHANDLE pBitmap;

pointer to the bitmap handle

LPRECT prcBounds;

pointer to the bounding rectangle for drawing

HANNOBJECT hObject;

handle to the annotation object to restore

L_BOOL fSelected;

flag that indicates which objects to restore

Restores redact objects that have a bitmap saved inside them.

Parameter Description
pBitmap Pointer to the bitmap handle referencing the bitmap to update.
prcBounds Pointer to the Windows RECT structure that specifies the bounding rectangle where the annotations will be drawn.
  You can pass NULL for the default, which matches the bitmap by specifying left = 0, top = 0, right = bitmap width, and bottom = bitmap height.
hObject Handle to the annotation object to restore. The object can be a redact object or a container object (in which case, all the redact objects contained inside - or only the selected redact objects) are restored.
fSelected Flag that indicates which objects to restore. Possible values are:
  Value Meaning
  TRUE Restore only the selected objects.
  FALSE Restore all objects.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Restores the background of a redact object. This function is valid only for redact objects or container objects (for more than one redact object).

If you realize a redact object, moving the redact object will leave the original location of the redact object hidden. When you call L_AnnRealize and specify RedactOnly, for every Redact object, the background of the image behind is saved inside the object. To restore the image under the redact object (so that when you move the redact object, the underlying image is not hidden), you must unrealize the redact object by calling L_AnnUnrealize. L_AnnUnrealize will restore the background from a redact object that contains a background bitmap. The background of a locked object cannot be restored until the object is unlocked. If hObject is a container, then fSelected indicates whether all the Redact objects included in the container should be restored, or if only selected objects should be restored. If hObject is a Redact object, fSelected is ignored. Locked redact objects are not restored. The background bitmap stored inside the redact object is destroyed after being restored.

The return value is SUCCESS if all objects have been restored, ERROR_ANN_LOCKED if one or more redact objects are not restored because they are still locked. Any other error code is an indication of a fatal error.

Encryptor objects cannot be realized. The encryptor is the only annotation object that cannot be realized.

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_AnnRealize, L_AnnLock, L_AnnUnlock

Topics

Annotation Functions (Document/Medical only)Realizing to a Bitmap

 

Implementing an Automated Annotation Program

 

Implementing a Non-automated Annotation Program

 

Displaying and Manipulating Annotation Objects

Example

This example attempts to restore all redact objects within a container. If this is unsuccessful, a message is displayed.

L_INT AnnUnrealizeExample(HANNOBJECT    hContainer,/* Container object */ 
pBITMAPHANDLE pBitmap)   /* bitmap handle */ 
{ 
   /* unrealize all of the redact objects */ 
   if(L_AnnUnrealize(pBitmap, NULL, hContainer, FALSE) == ERROR_ANN_LOCKED) 
      MessageBox(NULL, TEXT("Some redact objects are locked and cannot be restored"), TEXT("Warning"), MB_OK); 
   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