Using the Magnifying Glass
LEADTOOLS provides a "magnifying glass" for the LBitmapWindow class. This magnifying glass provides a means of "zooming in" on the image loaded into an LBitmapWindow object.
Note that in the Document/Medical toolkits LEADTOOLS also provides a "Zoom View" that can be attached to a window handle.
Use the "Zoom View" if you want to:
display one or more zoomed views for a single displayed image
display an annotation in addition to the zoomed view
display callout lines
For more information about the Zoom View, refer to Using the Zoom View.
Use the "Magnifying Glass" if you want to:
control the painting options for the zoomed display.
set the contrast, gamma and intensity for the zoomed area.
The magnifying glass options and the zoomed display options are set using a MAGGLASSOPTIONS structure. To use the magnifying glass, call the LBitmapWindow::GetMagGlassOptions function to get the current magnifying glass options. Next call the LBitmapWindow::SetMagGlassOptions function to set any new magnifying glass options to be used. Then call LBitmapWindow::SetToolType to set the tool type to TOOL_MAGGLASS. As the magnifying glass is moved over an image, the zoomed - in view is also displayed. To determine whether a class object has a magnifying glass attached to it, call the LBitmapWindow::IsToolTypeMagGlass function. The following can be set in a MAGGLASSOPTIONS structure:
size of the magnifying glass
shape of the magnifying glass
magnifying glass border (color, thickness, appearance)
magnification level
paint characteristics
section of the pixel on which to center the zoomed image
color masks
When the magnifying glass is no longer needed, just change the tool type using LBitmapWindow::SetToolType.