#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetTextScaleWithDpi(hObject, pbTextScaleWithDpi)
Gets a value indicating whether to consider the bitmap's DPI when calculating the text font size.
Handle to an automation object.
Pointer to a variable to be updated with a flag that indicates whether to consider the bitmap's DPI when calculating the text font size. Possible values are:
| Value | Meaning | 
|---|---|
| TRUE | Consider the bitmap's DPI. | 
| FALSE | Ignore the bitmap's DPI. | 
| Value | Meaning | 
|---|---|
| SUCCESS | |
| < 1 | An error occurred. Refer to Return Codes. | 
Required DLLs and Libraries
Win32, x64, Linux.
Sample for L_AnnGetTextScaleWithDpi, L_AnnSetTextScaleWithDpi.
To try this sample, paste the code into the CDLL Annotation Demo (Annotate.cpp).
And replace the code for the About Box (IDM_ABOUT) as follows:
case IDM_ABOUT:
{
ABOUT_DIALOG(hwnd, "Annotation");
hwndChild = (HWND)SendMessage(hwndClient, WM_MDIGETACTIVE, 0, 0);
if (hwndChild)
{
LPCHILDDATA pData = (LPCHILDDATA)GETWNDDATA(hwndChild);
AnnEnumerateObjects(pData->hContainer);
}
break;
}
	
L_INT AnnGetTextScaleWithDpiExample(HANNOBJECT hObject, HWND hWnd){/* hObject must be of type ANNOBJECT_TEXT */L_INT nRet;L_BOOL bTextScaleWithDpi = L_FALSE;nRet = L_AnnGetTextScaleWithDpi(hObject, &bTextScaleWithDpi); // Store old valuenRet = L_AnnSetTextScaleWithDpi(hObject, !bTextScaleWithDpi); // Toggle the value and repaintRedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE);MessageBox(NULL, TEXT("TextScaleWithDpi Value has been toggled."), TEXT("Info"), MB_OK);nRet = L_AnnSetTextScaleWithDpi(hObject, bTextScaleWithDpi); // Reset old value and repaintRedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE);MessageBox(NULL, TEXT("TextScaleWithDpi Value has been restored."), TEXT("Info"), MB_OK);return SUCCESS;}L_INT EXT_CALLBACK annTextDPIScaleCallback(HANNOBJECT hObject, L_VOID *pUserData){L_UINT ObjectType;L_INT ObjectCount;ObjectCount = (L_INT)pUserData;L_AnnGetType(hObject, &ObjectType);if (ObjectType == ANNOBJECT_TEXT || ObjectType == ANNOBJECT_NOTE){AnnGetTextScaleWithDpiExample(hObject, GetActiveWindow());}return SUCCESS;}L_VOID AnnEnumerateObjects(HANNOBJECT hContainer){L_AnnEnumerate(hContainer, annTextDPIScaleCallback, NULL, ANNFLAG_RECURSE, NULL);}
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
