[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Draws the image content in SrcGraphic on the canvas at the specified position.
Source position: graphics.pp line 1104
public procedure TCanvas.Draw( |
X: Integer; |
Y: Integer; |
SrcGraphic: TGraphic |
); virtual; |
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. |
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.
|
Expands or contracts the specific graphic content to fit the specified destination rectangle on the canvas. |
|
|
Indicates the raster operation used to combine pixel colors on the drawing surface. |
|
|
Event handler signalled after a change to the canvas. |
|
|
Event handler signalled prior to changing the canvas. |
|
|
Width - The native, unstretched, width of the graphic. |
|
|
The native, unstretched height for the graphic. |
|
|
Method used to draw the Graphic on the specified Canvas, in the specified Rectangle. |
|
Version 4.0 | Generated 2025-05-03 | Home |