TCanvas.Draw procedure
Draws the image content in SrcGraphic on the canvas at the specified position.
Declaration
procedure Draw(X: Integer; Y: Integer; SrcGraphic: TGraphic); virtual
; reintroduceArguments
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
with 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 render the content in SrcGraphic on the canvas at the position specified in X and Y. The Width and Height in SrcGraphic set the bounds for the image rectangle applied to the canvas using StretchDraw. Since a stretch mode is not enabled when StretchDraw is called, the source graphic is not enlarged or shrunk to the canvas size. The source graphic is clipped if its bounds exceeds the canvas bounds. The Draw method in SrcGraphic performs the actions needed to position and rendering the content to the Pixels in the canvas.
CopyMode determines the raster operation performed for the Pixels affected on the canvas.
Calling Draw causes the OnChanging and OnChange events to be signalled (when assigned). OnChanging occurs prior to calling Draw in the TGraphic instance. OnChange occurs after calling Draw in the TGraphic instance.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
