Vcl.Graphics.TCustomCanvas.StretchDraw

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure StretchDraw(const Rect: TRect; Graphic: TGraphic); virtual; abstract;

C++

virtual void __fastcall StretchDraw(const Winapi::Windows::TRect &Rect, TGraphic* Graphic) = 0 ;

Properties

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

Description

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

Override the StretchDraw method to implement drawing 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.

See Also