Leadtools.Windows.Controls Namespace > ImageViewer Class : ZoomToRectangle Method |
The control will call this method during InteractiveMode.ZoomTo.
Imports Leadtools.Windows.Controls Public Sub BitmapSourceViewer_ZoomToRectangle(ByVal viewer As ImageViewer) Dim rectSize As Double = 200 Dim left As Double = (viewer.PhysicalSize.Width - rectSize) / 2.0 Dim top As Double = (viewer.PhysicalSize.Height - rectSize) / 2.0 Dim rcZoom As Rect = New Rect(left, top, rectSize, rectSize) viewer.ZoomToRectangle(rcZoom) End Sub
using Leadtools.Help; using Leadtools.Windows.Controls; public void BitmapSourceViewer_ZoomToRectangle(ImageViewer viewer) { double rectSize = 200; double left = (viewer.PhysicalSize.Width - rectSize) / 2.0; double top = (viewer.PhysicalSize.Height - rectSize) / 2.0; Rect rcZoom = new Rect(left, top, rectSize, rectSize); viewer.ZoomToRectangle(rcZoom); }
using Leadtools.Help; using Leadtools.Windows.Controls; public void BitmapSourceViewer_ZoomToRectangle(ImageViewer viewer) { double rectSize = 200; double left = (viewer.PhysicalSize.Width - rectSize) / 2.0; double top = (viewer.PhysicalSize.Height - rectSize) / 2.0; Rect rcZoom = new Rect(left, top, rectSize, rectSize); viewer.ZoomToRectangle(rcZoom); }
Imports Leadtools Imports Leadtools.Windows.Controls Public Sub BitmapSourceViewer_ZoomToRectangle(ByVal viewer As ImageViewer) Dim rectSize As Double = 200 Dim left As Double = (viewer.PhysicalSize.Width - rectSize) / 2.0 Dim top As Double = (viewer.PhysicalSize.Height - rectSize) / 2.0 Dim rcZoom As Rect = New Rect(left, top, rectSize, rectSize) viewer.ZoomToRectangle(rcZoom) End Sub