IrrDraw2DImageElement

section index

## NAME

IrrDraw2DImageElement - Draws a part of a texture into the rectangle optionally using a alpha and color.

## SYNOPSIS

IrrDraw2DImageElement(*texture.l, x.l,y.l, source_tx.l,source_ty.l, source_bx.l,source_by.l,use_alpha.l,[color_alpha.l,color_r.l,color_g.l,color_b.l])

## FUNCTION

draw an image to the screen from a specified rectangle in the source image this enables you to place lots of images into one texture for 2D drawing. In addition this function also includes transparency and uses image alpha channels

## INPUTS

*texture.l | - | pointer to a Texture (loaded with IrrGetTexture())
source_tx.l | - | topX Position of the Source Image
source_ty.l | - | topY Position of the Source Image
source_bx.l | - | bottomX Position of the Source Image
source_by.l | - | bottomY Position of the Source Image
use_alpha.l | - | Bool use Alpha Mask or not: #IRR_USE_ALPHA #IRR_IGNORE_ALPHA Optional:
color_alpha.l | - | Alpha value
color_r.l | - | Red value
color_g.l | - | Green value
color_b.l | - | Blue value

## RESULT

nothing

## EXAMPLE

       IrrDraw2DImageElement( *PureBasicLogo, screen_width - 109 - 4, 4,  0,0,109,31, #IRR_USE_ALPHA )

## NOTES

The Optional Color and Alpha values represent the Color with which the image is colored. If the color equals Color(255,255,255,255), the color is ignored. Note that the alpha component is used: If alpha is other than 255, the image will be transparent