SetDstRect method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int SetDstRect (int iLeft, int iTop, int iWidth, int iHeight);

Delphi Syntax

SetDstRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;

Overview

Refer to Displaying an Image.

Remarks

Sets the destination rectangle that is used when painting an image.

The destination rectangle determines how the source rectangle is scaled and how the image is positioned in the device context.

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

The AutoScroll property must be FALSE before setting DstLeft or DstTop.

See Also

Elements:

SetDstClipRect method, SetSrcClipRect method, SetSrcRect method

Topics:

Raster Images: Displaying Images