#include "ltwrappr.h"
virtual L_INT LAnnStamp::SetBitmap(pBitmap, uFlags=0)
virtual L_INT LAnnStamp::SetBitmap(pBitmap, uFlags=0)
LBitmapBase * pBitmap; |
pointer to an LBitmapBase object |
pBITMAPHANDLE pBitmap; |
pointer to the bitmap handle |
L_UINT uFlags; |
flags that determine the object to process |
Sets the bitmap of the annotation object.
Parameter | Description | |
pBitmap | Pointer to the bitmap object referencing the bitmap object to assign to the specified object. | |
pBitmap | Pointer to the bitmap handle referencing the bitmap to assign to the specified object. | |
uFlags | Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values: | |
Value | Meaning | |
0 | Process only the specified object. | |
ANNFLAG_SELECTED | [0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, use the LAnnotation::IsSelected and LAnnotation::SetSelected functions. | |
ANNFLAG_NOINVALIDATE | [0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
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. |
Win32, x64.
Functions: |
|
Topics: |
|
|
This is an example for LAnnStamp::SetBitmap(pBitmap, uFlags=0), with pBitmap of type pBITMAPHANDLE:
L_INT LAnnStamp_SetBitmapExample(HWND hWnd, pBITMAPHANDLE pBitmap, LAnnContainer * pAnnContainer, LAnnStamp * pAnnStamp)
{
L_INT nRet;
HDC hWindowDC; /* Device context of the current window */
ANNRECT ContainerRect; /* Root container's rectangle */
ANNRECT MyStampRect; /* Rectangle for the stamp object */
RECT rAnnBounds; /* Bounding rectangle used to draw the object */
/* Get the device context of the current window */
hWindowDC = GetDC (hWnd);
/* Get the container's rectangle */
nRet = pAnnContainer->GetRect(&ContainerRect);
if(nRet != SUCCESS)
return nRet;
/* Size and position the stamp, adjusting the height to keep the bitmap's aspect ratio */
MyStampRect.left = ContainerRect.right / 8;
MyStampRect.top = ContainerRect.bottom / 2;
MyStampRect.right = ContainerRect.right / 2;
MyStampRect.bottom = MyStampRect.top +
(((MyStampRect.right - MyStampRect.left) * BITMAPHEIGHT(pBitmap)) / BITMAPWIDTH(pBitmap));
nRet = pAnnStamp->SetRect(&MyStampRect);
if(nRet != SUCCESS)
return nRet;
/* Assign the bitmap to the stamp;*/
nRet = pAnnStamp->SetBitmap(pBitmap,0);
if(nRet != SUCCESS)
return nRet;
/* Display the stamp */
nRet = pAnnStamp->GetBoundingRect(&rAnnBounds);
if(nRet != SUCCESS)
return nRet;
nRet = pAnnStamp->Draw(hWindowDC, &rAnnBounds);
if(nRet != SUCCESS)
return nRet;
ReleaseDC(hWnd, hWindowDC);
/* Remove the queued paint message */
ValidateRect(hWnd, &rAnnBounds);
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.