#include "l_bitmap.h"
L_LTDIS_API L_INT L_SetMagGlassPaintOptions(hWnd, pMagGlassPaintOptions)
Sets the Magnifying Glass paint options.
Handle of the window to which the magnifying glass is attached.
Pointer to a structure that contains the new magnifying glass paint options to set.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The function is used to set the magnifying glass paint options (Intensity, Contrast and Gamma). Those paint options will be used when the magnifying glass paints the zoomed area, so you will see this area with some extra contrast or intensity.
Required DLLs and Libraries
Win32, x64.
This example starts the Magnifying Glass then calls L_SetMagGlassPaintOptions
function to set the Magnifying Glass paint options.
L_INT SetMagGlassPaintOptionsExample(L_HWND hWnd,
pBITMAPHANDLE pBitmap,
RECT* prcView)
{
L_INT nRet;
L_TCHAR szMsg[256]=TEXT("");
MAGGLASSPAINTOPTIONS MagGlassPntOptions;
MAGGLASSOPTIONS MagGlassOpt;
// Starting the Magnifying Glass
memset(&MagGlassOpt, 0, sizeof(MAGGLASSOPTIONS));
MagGlassOpt.uStructSize = sizeof (MAGGLASSOPTIONS);
MagGlassOpt.nWidth = 100;
MagGlassOpt.nHeight = 100;
MagGlassOpt.nZoom = 400;
MagGlassOpt.clrPen = RGB(255,0,0);
MagGlassOpt.hMagCursor = NULL;
MagGlassOpt.clrBack = RGB(128,128,128);
MagGlassOpt.bEllipse = FALSE;
MagGlassOpt.nBorderSize = 1;
MagGlassOpt.b3D = TRUE;
MagGlassOpt.uPaintFlags = 0;
MagGlassOpt.pMask = NULL;
MagGlassOpt.uMaskCount = 0;
MagGlassOpt.nCrosshair = CROSSHAIR_FINE;
MagGlassOpt.bIgnoreRgn = TRUE;
MagGlassOpt.bCenter = TRUE;
nRet = L_StartMagGlass(hWnd, pBitmap, prcView, &MagGlassOpt, NULL, NULL);
if (nRet != SUCCESS)
{
wsprintf(szMsg, TEXT("Error Starting the Magnifying Glass, Error: %d"), nRet);
MessageBox(hWnd, szMsg, TEXT("Error"), MB_ICONEXCLAMATION | MB_OK);
return nRet;
}
// Setting the Magnifying Glass Paint contrast, gamma and intensity
MagGlassPntOptions.uStructSize = sizeof(MAGGLASSPAINTOPTIONS);
MagGlassPntOptions.nContrast = 100;
MagGlassPntOptions.nGamma = 100;
MagGlassPntOptions.nIntensity = 100;
nRet = L_SetMagGlassPaintOptions(hWnd, &MagGlassPntOptions);
if (nRet != SUCCESS)
{
wsprintf(szMsg, TEXT("Error Setting the Magnifying Glass painting options, Error: %d"), nRet);
MessageBox(hWnd, szMsg, TEXT("Error"), MB_ICONEXCLAMATION | MB_OK);
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