LEADTOOLS Windows Forms (Leadtools.WinForms assembly)

ZoomAtPoint Method

Show in webframe
Example 





The point at which to zoom the image display, in client coordinates.
Scale factor to use. A value greater than 1 will zoom the image in and a value less than 1 will zoom the image out. Must be a value greater than 0.
Zooms the image display at the specified point with the specified scale factor.
Syntax
public virtual void ZoomAtPoint( 
   Point pt,
   double scaleFactor
)
'Declaration
 
Public Overridable Sub ZoomAtPoint( _
   ByVal pt As Point, _
   ByVal scaleFactor As Double _
) 
'Usage
 
Dim instance As RasterImageViewer
Dim pt As Point
Dim scaleFactor As Double
 
instance.ZoomAtPoint(pt, scaleFactor)

            

            
public:
virtual void ZoomAtPoint( 
   Point pt,
   double scaleFactor
) 

Parameters

pt
The point at which to zoom the image display, in client coordinates.
scaleFactor
Scale factor to use. A value greater than 1 will zoom the image in and a value less than 1 will zoom the image out. Must be a value greater than 0.
Remarks

If the value of scaleFactor was anything other than the default value of 1, then this method will zooms in (if the value is greater than 1) or zooms out (if the value is less than 0) the image as well around the point specified by pt.

Example
Copy Code  
Imports Leadtools.WinForms
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Color
Imports Leadtools.Drawing

Private Shared Sub ZoomAtPointExample(ByVal viewer As RasterImageViewer)
   ' Subscribe to the viewer click event
   AddHandler viewer.MouseClick, AddressOfviewer_MouseClick
End Sub
Private Shared Sub viewer_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs)
   ' Zoom in twice around the mouse coordinates
   Dim viewer As RasterImageViewer = CType(sender, RasterImageViewerExamples)
   viewer.ZoomAtPoint(New Point(e.X, e.Y), 2.0)
End Sub
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Color;
using Leadtools.Drawing;

private static void ZoomAtPointExample(RasterImageViewer viewer)
{
   // Subscribe to the viewer click event
   viewer.MouseClick += viewer_MouseClick;
}
private static void viewer_MouseClick(object sender, MouseEventArgs e)
{
   // Zoom in twice around the mouse coordinates
   RasterImageViewer viewer = sender as RasterImageViewer;
   viewer.ZoomAtPoint(new Point(e.X, e.Y), 2.0);
}
Requirements

Target Platforms

See Also

Reference

RasterImageViewer Class
RasterImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.