FitTo Method

Example-VB Example-VC++

Scales the image relative to the image window.

Available With

Ö Imaging for Windows Professional Edition V1.0, V1.1, and V2.0
Ö Imaging for Windows 95 and 98
Ö Imaging for Windows NT 4.0

Applies To

Image Edit control

Syntax

object.FitTo Option[,Repaint]

Arguments

Parameter Data Type Constant Setting Description

Option Integer BEST_FIT 0 Best fit Fits the image to the size of the window
FIT_TO_WIDTH 1 Fit to width Fits the image to the width of the window
FIT_TO_HEIGHT 2 Fit to height Fits the image to the height of the window
INCH_TO_INCH 3 Inch to inch Maintains the relative size of the original image regardless of the resolution of the image
Repaint Boolean True
False
Image is repainted (default)
Image is not repainted

Return Value

None

Remarks

The Inch to inch setting calculates the size of the image dependent upon the dots per inch reported by the display driver.

When invoked, the FitTo method updates the Zoom property with the new zoom factor.

The FitTo method can be invoked before or after an image is displayed.  If an image is displayed when the method is invoked, and the Repaint parameter is set to True, the image is redisplayed using the Option setting specified.