←Select platform

ScaleFactor Property

Summary

The zoom factor used to display the image.

Syntax

C#
VB
C++
public virtual double ScaleFactor { get; set; } 
Public Overridable Property ScaleFactor As Double 
public: 
virtual property double ScaleFactor { 
   double get(); 
   void set (    double ); 
} 

Property Value

The zoom factor used to display the image.

Remarks

You can get and set this property when the SizeMode property is RasterPaintSizeMode.Normal. This property is read only when the SizeMode property is set to any other value. When SizeMode is set to RasterPaintSizeMode.Stretch, the zoom factor is the smallest of the Width or Height zoom factors (the aspect ratio is not preserved).

Example

This example zooms out on the image displayed in the viewer

C#
VB
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Drawing; 
 
public void RasterImageViewer_ScaleFactor(RasterImageViewer viewer) 
{ 
   viewer.ScaleFactor = viewer.ScaleFactor * 0.9f; 
   string s = string.Format("CurrentXScaleFactor {0}, CurrentYScaleFactor {1}", viewer.CurrentXScaleFactor, viewer.CurrentYScaleFactor); 
   MessageBox.Show(s); 
} 
Imports Leadtools.WinForms 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing.Color 
Imports Leadtools.Drawing 
 
Public Sub RasterImageViewer_ScaleFactor(ByVal viewer As RasterImageViewer) 
   viewer.ScaleFactor = viewer.ScaleFactor * 0.9F 
   Dim s As String = String.Format("CurrentXScaleFactor {0}, CurrentYScaleFactor {1}", viewer.CurrentXScaleFactor, viewer.CurrentYScaleFactor) 
   MessageBox.Show(s) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.WinForms Assembly