TRasterImage.Draw procedure
Renders the image to the specified canvas.
Declaration
procedure Draw(DestCanvas: TCanvas; const DestRect: TRect); overrideArguments
DestCanvas | Canvas where the image is rendered. |
DestRect | Canvas coordinates where the image is drawn. |
Description
Draw is an overridden method used to render the raster image to
the specified canvas using the given rectangle. Draw implements the abstract
method defined in the ancestor class.
DestCanvas contains the canvas instance where the raster image is
rendered.
DestRect contains the canvas coordinates in DestCanvas where the
image is drawn.
No actions are performed in the method if the Width or the
Height for the image is 0 (zero).
Draw ensures that valid handles are available in BitMapHandle and
MaskHandlle (when Masked is True). No actions
are performed in the method when a valid BitmapHandle does not exist.
Draw uses the Device Contexts for Canvas and DestCanvas, and calls the
StretchMaskBlt routine in the LCL interface to render the image
using methods in the widgetset. The Changing method in DestCanvas
is called before drawing the image. The Changed method in
DestCanvas is called after the image is drawn.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
