AnnEnableZoomView Example for Visual Basic
Dim RasterAnn As LEADRasterAnnotation
Private Sub CreateZoomView_Click()
Dim RasterIO
As New LEADRasterIO
Dim ZoomView
As New LEADRasterZoomView
Dim nBitmapWidth,
nBitmapHeight As Long
Dim nZoomViewWidth,
nZoomViewHeight As Long
Set RasterAnn
= New LEADRasterAnnotation
'Loading
Annotation File
RasterIO.Load LEADRasterView1.Raster,
"C:\Ann.tif", 0, 0, 1
LEADRasterView1.DoubleBuffer = True
LEADRasterView1.PaintSizeMode = PAINTSIZEMODE_FIT
RasterAnn.AnnParentRasterView
= LEADRasterView1
RasterAnn.AnnUserMode = ANN_USERMODE_RUN
RasterAnn.AnnEnableZoomView
= True
RasterAnn.AnnLoad "c:\Ann.tif",
0
'Create
the source rectangle in the center of the bitmap
ZoomView.SrcTop =
0
ZoomView.SrcLeft
= 0
ZoomView.SrcHeight
= 200 * 100
ZoomView.SrcWidth
= 200 * 100
'Zoom View
destination rectangle will be to the left of the source rectangle
ZoomView.DstTop =
0
ZoomView.DstLeft
= ZoomView.SrcLeft + 50 * 100
'Setting
Zoom View destination rectangle properties
ZoomView.BorderStyle
= ZOOM_VIEW_BORDERSTYLE_3D
'Setting
Zoom View Source rectangle properties
ZoomView.SrcBorderStyle = SOURCE_BORDERSTYLE_3D
ZoomView.ZoomFactor = 200
ZoomView.Enabled
= True
ZoomView.ForceDst = False
'Assign
Annotation Container to the Zoom View
ZoomView.AnnContainer
= RasterAnn.AnnContainer
LEADRasterView1.CreateZoomView ZoomView
End Sub