Icon DrawImage Method

procedure DrawImage(Image: TElement; X,Y: Double)

procedure DrawImage(Image: TElement; X,Y: Double; Width,Height:
      Double)

procedure DrawImage(Image: TElement; SourceX,SourceY: Double;
      SourceWidth,SourceHeight: Double; DestX,DestY: Double;
      DestWidth,DestHeight: Double)

Available In: Visual Client Applications

Use this method to draw an image, or a portion of an image, at a specified point or, optionally, into a specified rectangle.

The first version of this method simply draws the image at a specified point, retaining the image's original height and width.

The second version of this method draws the image at a specified point, but also scales the image so that it matches the specified height and width.

The last version of this method draws copies the specified rectangle from the image to the specified rectangle on the canvas.

Information If the specified TElement instance is a TImageElement instance, then it must be completely loaded before passing it to this method. If the image element has not been completely loaded, then an exception will be raised. You can use the Loaded property to determine if an image element has been completely loaded yet.
Image