imagekitcontrolname.SetRectDrawRatio(double Val)
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.
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.
In Visual Basic:
Dim Ret As Boolean
ImageKit1.LayerNo = -1
Ret = ImageKit1.GetImageType()
If Ret = False Then Exit Sub
ImageKit1.RectDrawRatio = ImageKit1.ImageHeight / ImageKit1.ImageWidth
ImageKit1.RectDraw = True
Setting this value
This value can be set at run-time.Retrieving this value
This value can be retrieved at run-time.