virtual L_INT LAnnContainer::Realize(pBitmap, prcBounds, bRedactOnly=TRUE)
virtual L_INT LAnnContainer::Realize(pBitmap, prcBounds, bRedactOnly=TRUE)
Applies the specified annotation objects to a bitmap, altering the bitmap, itself.
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 realize. Possible values are:
Value | Meaning |
---|---|
TRUE | Realize only redaction objects |
FALSE | Realize any visible object. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
All annotations in the Container are realized. You can specify redaction only if you only want to realize redaction objects, which are used for hiding information.
If you realize a redact object, moving the redact object will leave the original location of the redact object hidden. 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.
This function is implemented by treating the bitmap as a device context and drawing the annotations in the device context.
When you call LAnnContainer::Realize with bRedactOnly set to TRUE, the background behind the redact object is saved into the redact object. That background info is saved together with the object and can be restored later with LAnnContainer::Unrealize. If a REDACT object has a bitmap already, then the background is not saved. The background is saved inside locked objects, too. This way, complete security can be implemented. If it is desired for some portion of the image to be hidden, a REDACT object can be placed on top and LAnnContainer::Realize with bRedactOnly set to true can be called. The bitmap under the object is changed and that portion is saved inside the Redact object. Next, the object is locked and saved together with the bitmap. To restore the original image, the redact objects have to be unlocked with the correct key and then LAnnContainer::Unrealize must be called each time a Redact object is unlocked.
This function works only for 1, 4, 8, 16, and 24-bit images. When using an image that has some other number of bits per pixel, call LBitmapBase::ColorRes to change the image to a supported bits per pixel before calling LAnnContainer::Realize.
Win32, x64.
This is an example for LAnnContainer::Realize(pBitmap,
prcBounds, bRedactOnly) with pBitmap of type pBITMAPHANDLE:
L_INT LAnnContainer_RealizeExample(pBITMAPHANDLE pBitmap,LAnnLine& LeadAnnLine)
{
L_INT nRet;
LAnnContainer LeadAContainer ;
nRet = LeadAnnLine.GetTopContainer(&LeadAContainer) ;
if(nRet != SUCCESS)
return nRet;
nRet = LeadAContainer.Realize(pBitmap,NULL);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
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