Vcl.Graphics.TCanvas.StretchDraw

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure StretchDraw(const Rect: TRect; Graphic: TGraphic); override;

C++

virtual void __fastcall StretchDraw(const System::Types::TRect &Rect, TGraphic* Graphic);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCanvas

Description

Draws the graphic specified by the Graphic parameter in the rectangle specified by the Rect parameter.

Call StretchDraw to draw a graphic on the canvas so that the image fits in the specified rectangle. StretchDraw calls the Draw method of the graphic. The graphic object determines how to fit into the rectangle. This may involve changing magnification and/or aspect ratio.

To render the graphic in its natural size, use the Draw method, instead.

If the graphic is a TBitmap object, the bitmap is rendered using the value of CopyMode.

Note: If the graphic is an icon, it is not stretched.

See Also

Code Examples