L_DispContainerBurnTag

Summary

Burns the tag onto the bitmap.

Syntax

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerBurnTag(pBitmap, uRow, uAlign, pString, pFontFamily, nFontStyle, fFontSize, bShadow, nShadowColor, nColor, uFlags)

Parameters

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle of the bitmap on which the tag is burned.

L_UINT uRow

A zero-based index representing the line at which the overlay text will be drawn.

L_UINT uAlign

Value that specifies the origin point from which to count the rows specified in the uRow parameter. For example, if uAlign is DISPWIN_ALIGN_BOTTOMLEFT and uRow is 4, the tag is placed counting 4 rows from the bottom. Possible values are:

Value Meaning
DISPWIN_ALIGN_TOPLEFT [0x0000] Start counting rows from the top of the cell. The tag is left-justified.
DISPWIN_ALIGN_LEFTCENTER [0x0001] The tag is placed in the center, based on the height of the cell, and is left-justified.
DISPWIN_ALIGN_BOTTOMLEFT [0x0002] Start counting rows from the bottom of the cell. The tag is left-justified.
DISPWIN_ALIGN_TOPCENTER [0x0003] The tag is placed in the center, based on the width of the cell, and is top-justified.
DISPWIN_ALIGN_BOTTOMCENTER [0x0004] The tag is placed in the center, based on the width of the cell, and is bottom-justified.
DISPWIN_ALIGN_TOPRIGHT [0x0005] Start counting rows from the top of the cell. The tag is right-justified.
DISPWIN_ALIGN_RIGHTCENTER [0x0006] The tag is placed in the center, based on the height of the cell, and is right-justified.
DISPWIN_ALIGN_BOTTOMRIGHT [0x0007] Start counting rows from the bottom of the cell. The tag is right-justified.

LPTSTR pString

A character string specifying the tag's text.

L_TCHAR *pFontFamily

Pointer to variable specifying the font family to which the font belongs.

L_INT nFontStyle

A variable specifying the font style of the text.

L_FLOAT fFontSize

A variable specifying the font size of the text.

L_BOOL bShadow

A boolean flag that indicates whether to include text shadowing in the burn process. Possible values are:

Value Meaning
TRUE Include text shadowing in the burn process.
FALSE Exclude the text shadow in the burn process.

L_INT nShadowColor

A variable specifying the color of the text's shadow.

L_INT nColor

A variable specifying the color of the text.

L_UINT uFlags

Reserved for future use. Pass zero.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The image data can change if the user calls this function.

Required DLLs and Libraries

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

See Also

Functions

Topics

Example

This function burns a text string to the viewer's bitmap.

L_INT DispContainerBurnTagExample(HDISPCONTAINER hCon) 
{ 
   BITMAPHANDLE Bitmap; 
   L_INT        nRet; 
 
   L_INT nCellIndex = 0; 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, nCellIndex, 0); 
 
   // Just burn using the bitmap in the active sub-cell. 
   // this is done by setting the nSubCell parameter to -2. 
   nRet = L_DispContainerGetBitmapHandle(hCellWnd, -2, &Bitmap, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_DispContainerBurnTag(&Bitmap, 0, DISPWIN_ALIGN_BOTTOMCENTER, L_TEXT("My Sample Text"), L_TEXT("Arial"), 0, 12, TRUE, RGB(128, 128, 128), RGB(255, 255, 255), 0); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_DispContainerSetBitmapHandle(hCellWnd, -2, &Bitmap, FALSE, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   // Repaint the cell after the user is done with the changes. 
   nRet = L_DispContainerRepaintCell(hCellWnd, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.