ZoomToRect method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Access 2.0 example

Access 95, 97 example
Visual J++ example

Syntax short ZoomToRect (float fLeft, float fTop, float fWidth, float fHeight);

Overview:  Refer to Displaying an Image

Remarks

Adjusts the destination display rectangle to zoom in on the part of the image that you specify.

You specify a rectangle in the Main Control's client area. This method increases the dimensions of the destination display rectangle so that your rectangle is enlarged and centered to fit the client area. If scroll bars are turned on, they are adjusted to the new size and position.

Because of a Windows limitation, destination rectangle measurements, when converted to pixels, cannot exceed the maximum value of an integer. On WIN32 systems, this is rarely a problem. LEADTOOLS returns an ERROR_INV_RANGE error if the problem occurs. An alternative for scaling large images is to make the source rectangle smaller, using the SetSrcRect method.

See Also

Topics:  Raster Images: Displaying Images