When using the mouse to select an area on the image, this property sets the ratio of the height to the width in that selected area.

[Visual Basic] Public Property RectDrawRatio As Double
[C#] public double RectDrawRatio {get; set;}

Property Value

The ratio of the height to the width in the selected area (default value is 0 meaning ratio is not set)

Explanation

When using the mouse to select an area on the image, RectDrawRatio property sets the ratio of the height to the width in that selected area. For this property to be enabled, the RectDraw property must be True. When the RectDrawRatio property is 0 (default value) there is no set ratio between the height and width of the selected area. Since the ratio is defined as heigth/width, values of more than 1 mean that the height of the selected area will be greater than the width. Likewise values less than 1 mean the width will be greater than the length.

Example

Below is a code snippet that illustrates how to set the ratio of the height and width in the selected area to be the same as in the currently displayed image.


[Visual Basic]
Dim Ret As Boolean

ImageKit1.LayerNumber = -1
Ret = ImageKit1.GetImageType()
If Ret = False Then Exit Sub
ImageKit1.RectDrawRatio = ImageKit1.Height / ImageKit1.Width

[C#]
bool Ret;

ImageKit1.LayerNumber = -1;
Ret = ImageKit1.GetImageType();
if (Ret == False) return Ret;
ImageKit1.RectDrawRatio = ImageKit1.Height / ImageKit1.Width;

See Also

ImageKit Members | Newtone.ImageKit.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation