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:

image\sqrblit.gif display one or more zoomed views for a single displayed image

image\sqrblit.gif display an annotation in addition to the zoomed view

image\sqrblit.gif display callout lines

For more information about the Zoom View, refer to Using the Zoom View.

Use the "Magnifying Glass" if you want to:

image\sqrblit.gif control the painting options for the zoomed display.

image\sqrblit.gif 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:

image\sqrblit.gif size of the magnifying glass

image\sqrblit.gif shape of the magnifying glass

image\sqrblit.gif magnifying glass border (color, thickness, appearance)

image\sqrblit.gif magnification level

image\sqrblit.gif paint characteristics

image\sqrblit.gif section of the pixel on which to center the zoomed image

image\sqrblit.gif color masks

When the magnifying glass is no longer needed, just change the tool type using LBitmapWindow::SetToolType.