DrawAlphaImage()

Syntax

DrawAlphaImage(ImageID, x, y [, ConstAlpha])
Description
Draws an image to the current drawing output using alpha-blending. The filling mode is determined by DrawingMode(). The current output is set with StartDrawing().

Parameters

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.
ConstAlpha (optional) The amount of extra transparency to apply to the image when drawing. The value can range from 0 (fully transparent) to 255 (fully opaque). Even images that have no alpha channel themselves can be drawn with transparency this way.

Return value

None.

Remarks

This command works on all drawing outputs, even those that do not support the alpha-blending flags in DrawingMode(). The image will be drawn at its original size. ResizeImage() can be used to change the size of an image.

This command cannot be used to draw Icons (loaded from .ico files).

See Also

DrawImage(), ImageID()

Supported OS

All

<- CustomGradient() - 2DDrawing Index - DrawImage() ->