virtual L_DOUBLE LAnnotation::GetScalarX()
Gets the horizontal scaling factor that is applied to the annotation object.
The horizontal scaling factor.
Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.
Offset values, which are set by the LAnnotation::SetOffsetX and LAnnotation::SetOffsetY functions, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.
Win32, x64.
L_INT LAnnotation_GetScalarXExample(LAnnotation& LeadAnn,LBitmapBase& LeadBitmap)
{
L_INT nRet;
L_INT nXPercent, nYPercent; // X and Y scale percentage
L_DOUBLE dXScalar, dYScalar; // X and Y floating point scalars
L_TCHAR szMessage[80]; // Message buffer
RECT rClientArea ;
// Get the floating point scalars
dXScalar = LeadAnn.GetScalarX();
dYScalar = LeadAnn.GetScalarY();
// Convert the scalars to percentages
nXPercent = (L_INT)(dXScalar * 100);
nYPercent = (L_INT)(dYScalar * 100);
// Display the percentages in a message
wsprintf (szMessage, TEXT("%d percent X and %d percent Y"), nXPercent, nYPercent);
MessageBox (NULL, szMessage, TEXT("Notice"), MB_OK);
//...
//...
GetClientRect(LeadAnn.GetWnd(),&rClientArea);
nRet = LeadAnn.SetScalarX((L_DOUBLE) rClientArea.right / LeadBitmap.GetWidth());
if(nRet != SUCCESS)
return nRet;
nRet = LeadAnn.SetScalarY((L_DOUBLE) rClientArea.bottom / LeadBitmap.GetHeight());
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
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.