Leadtools.Windows.Controls Namespace > ImageBox Class : CurrentYScaleFactor Property |
public double CurrentYScaleFactor {get;}
'Declaration Public ReadOnly Property CurrentYScaleFactor As Double
public double CurrentYScaleFactor {get;}
get_CurrentYScaleFactor();
The CurrentXScaleFactor and CurrentYScaleFactor properties will always contain the current horizontal and vertical scale factors used to calculate the current display properties of the image in the control.
The following properties determine the final transformation of the image:
The control size
The image physical size in pixels and if using the image resolution is enabled with the UseDpi property
Any manual correction with the AspectRatioCorrection
The current zoom using the ScaleFactor property
The current display and automatic adjustment set with the SizeMode property
Image viewing transformation using the Flip, Reverse and RotateAngle properties
You can use the Transform property to calculate where a location or bounds on the image will be displayed on the control and vice versa using the Matrix.Transform methods, you can easily achieve this task with the control PointToImageCoordinates, BoundsToImageCoordinates, PointFromImageCoordinates and BoundsFromImageCoordinates methods
The CurrentXScaleFactor and CurrentYScaleFactor properties are read-only and cannot be changed by the user. To set a uniform scaling factor into the control, use the ScaleFactor property. To set a non-uniform scale factor in the control use the AspectRatioCorrection property.
For C#/VB examples, refer to CurrentXScaleFactor.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2