[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TCanvas.Draw

Draws the image content in SrcGraphic on the canvas at the specified position.

Declaration

Source position: graphics.pp line 1118

public procedure TCanvas.Draw(

  X: Integer;

  Y: Integer;

  SrcGraphic: TGraphic

); virtual;

Arguments

X

  

Horizontal coordinate where the content is drawn.

Y

  

Vertical coordinate where the content is drawn.

SrcGraphic

  

TGraphic instance with the image content drawn in the method.

Description

Draw is reintroduced method in TCanvas; it reimplements the inherited method to use the TGraphic instance in SrcGraphic as the container for the image content drawn in the method.

No actions are performed in the method if SrcGraphic has not been assigned.

Draw calls the StretchDraw method to draw the content in SrcGraphic on the canvas at the position specified in X and Y. The Width and Height in SrcGraphic are used to size the destination rectangle on the canvas.

See also

TCanvas.StretchDraw

  

Expands or contracts the specific graphic content to fit the specified destination rectangle on the canvas.

TGraphic.Width

  

Width - The native, unstretched, width of the graphic.

TGraphic.Height

  

The native, unstretched height for the graphic.

TRect


Version 3.2 Generated 2024-02-25 Home