DrawImage(ImageID, x, y [, Width, Height])
Draws an image to the current drawing output. The filling mode is determined by DrawingMode(). The current output is set with StartDrawing().


ImageID The ID of the image to draw. This value can be obtained using the ImageID() function from the image library.
x, y The position of the top/left corner of the image in the drawing output.
Width, Height (optional) The image will be resized and drawn. If these parameters are not specified then the image will be drawn in its original size.

Return value



The image will be alpha-blended if the current DrawingMode() specifies one of the alpha-blending flags, otherwise the image is just copied to the output. To draw an image using alpha-blending in any case, use the DrawAlphaImage() command.

A number of backends (including WindowOutput() on Linux) can not ignore the alphachannel when drawing images. So DrawImage() is equal to DrawAlphaImage() there. If you want consistent results, just use DrawAlphaImage() which should produce the same output on all backends.

See Also

DrawAlphaImage(), ImageID()

Supported OS


<- DrawAlphaImage() - 2DDrawing Index - DrawRotatedText() ->