Available in the LEADTOOLS Imaging toolkit. |
StopMagGlass example for C++ 4.0 and later
HRGN hRoundRectRgn;
m_LEAD1.SetScaleMode(3);
// Set MagGlass flags
// In this case the masked colors from the Magnifying Glass area will be all the colors
// except those colors which will be set using the MagGlassMask property
m_LEAD1.SetMagGlassFlags(MAGGLASS_MASK_INVERT);
//set the color mask to mask out all colors except a few shades of black
m_LEAD1.SetMagGlassMaskCount(3);
m_LEAD1.SetMagGlassMask(0, RGB(0, 0, 0));
m_LEAD1.SetMagGlassMask(1, RGB(1, 1, 1));
m_LEAD1.SetMagGlassMask(2, RGB(2, 2, 2));
m_LEAD1.SetRgnFrameType(0);
m_LEAD1.StartMagGlass(100.0f, 100.0f, 400, RGB(255, 0, 0), RGB(128, 128, 128), TRUE, 1.0f, FALSE, CROSSHAIR_FINE, TRUE, TRUE);
hRoundRectRgn = CreateRoundRectRgn(0, 0, 100, 100, 25, 25);
m_LEAD1.UpdateMagGlassShape(MAGGLASS_SHAPE_HRGN, (long) hRoundRectRgn);
DeleteRgn(hRoundRectRgn);
//.......some other work..............
//.......some other work..............
//Stop the MagGlass
m_LEAD1.StopMagGlass();