Available in the LEADTOOLS Imaging toolkit. |
StopMagGlass example for Visual Basic
Dim hRgn As Long
LEAD1.ScaleMode = 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
LEAD1.MagGlassFlags = MAGGLASS_MASK_INVERT
'set the color mask to mask out all colors except a few shades of black
LEAD1.MagGlassMaskCount = 3
LEAD1.MagGlassMask(0) = RGB(0, 0, 0)
LEAD1.MagGlassMask(1) = RGB(1, 1, 1)
LEAD1.MagGlassMask(2) = RGB(2, 2, 2)
LEAD1.RgnFrameType = 0
LEAD1.StartMagGlass 100, 100, 400, RGB(255, 0, 0), RGB(128, 128, 128), True, 1, False, CROSSHAIR_FINE, True, True
'assume that VB C DLL viewer Add-In Module was added to the current project
hRgn = CreateRoundRectRgn(0, 0, 100, 100, 25, 25)
LEAD1.UpdateMagGlassShape MAGGLASS_SHAPE_HRGN, hRgn
DeleteObject hRgn
'.......some other work..............
'.......some other work..............
'Stop the MagGlass
LEAD1.StopMagGlass