Restores Redact objects that have a bitmap saved inside them.
#include "ltwrappr.h"
virtual L_INT LAnnContainer::Unrealize(pBitmap, prcBounds, bSelected=TRUE)
virtual L_INT LAnnContainer::Unrealize(pBitmap, prcBounds, bSelected=TRUE)
Pointer to the bitmap handle referencing the bitmap to update.
Pointer to the LBitmapBase object referencing the bitmap to update.
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.
Flag that indicates which objects to restore. Possible values are:
Value | Meaning |
---|---|
TRUE | Restore only the selected objects. |
FALSE | Restore all objects. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Restores the background of a 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 LAnnContainer::Realize 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 LAnnContainer::Unrealize. LAnnContainer::Unrealize 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 bSelected 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, bSelected 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.
Win32, x64.
This is an example for LAnnContainer::Unrealize(pBitmap,
prcBounds, bSelected) with pBitmap of type pBITMAPHANDLE:
L_INT LAnnContainer_UnrealizeFirstExample(pBITMAPHANDLE pLeadBitmap,LAnnContainer& LeadAContainer)
{
L_INT nRet;
// unrealize all of the redact objects
nRet = LeadAContainer.Unrealize(pLeadBitmap, NULL);
if(nRet == ERROR_ANN_LOCKED)
MessageBox(NULL, TEXT("Some redact objects are locked and cannot be restored"), TEXT("Warning"), MB_OK);
return nRet;
}
/*This is an example for LAnnContainer::Unrealize(pBitmap, prcBounds, bSelected) with pBitmap
of type LBitmapBase :*/
L_INT LAnnContainer_UnrealizeSecondExample(LBitmapBase *pLeadBitmap,LAnnContainer& LeadAContainer)
{
L_INT nRet;
// unrealize all of the redact objects
nRet = LeadAContainer.Unrealize(pLeadBitmap, NULL) ;
if(nRet== ERROR_ANN_LOCKED)
MessageBox(NULL, TEXT("Some redact objects are locked and cannot be restored."), TEXT("Warning"), MB_OK);
return nRet;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document