#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetScalarX(hObject, pdScalarX)
Gets the horizontal scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.
Handle to the annotation object.
Address of the variable to be updated with the horizontal scaling factor.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Offset values, which are set by the L_AnnSetOffsetX and L_AnnSetOffsetY functions, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.
Before calling this function, you must declare a variable of data type L_DOUBLE. Then, pass the address of the variable in the pdScalarX
parameter. This function will update the variable with the horizontal scaling factor.
Required DLLs and Libraries
Win32, x64.
This example displays the current annotation scalars as percentages.
L_INT AnnGetScalarXExample(HANNOBJECT hContainer)/* Container annotation object */
{
L_INT nRet;
L_INT XPercent, YPercent; /* X and Y scale percentage */
L_DOUBLE XScalar, YScalar; /* X and Y floating point scalars */
L_TCHAR szMessage[80]; /* Message buffer */
/* Get the floating point scalars */
nRet = L_AnnGetScalarX(hContainer, &XScalar);
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnGetScalarY(hContainer, &YScalar);
if(nRet != SUCCESS)
return nRet;
/* Convert the scalars to percentages */
XPercent = (L_INT)(XScalar * 100);
YPercent = (L_INT)(YScalar * 100);
/* Display the percentages in a message */
wsprintf (szMessage, TEXT("%d percent X and %d percent Y"), XPercent, YPercent);
MessageBox (NULL, szMessage, TEXT("Notice"), MB_OK);
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