DrawImage3D sprite,x,y[,frame][,z#]

Parameters

sprite - handle of existing sprite
x - horizontal position in display (pixels)
y - vertical position in display (pixels)
frame (optional) - which animation frame to show
z (option) - z-position of sprite

Description

Positions the sprite on screen at x/y location.
Unlike the Blitz 2D DrawImage command, this only needs to be called when you wish to re-position the sprite.

By default the axis/handle of the sprite is top/left like the 2D DrawImage command.
Use HandleImage3D or MidHandle3D to adjust the axis.
The sprite mimics the Blitz 2D drawing method by masking out black.
You can use MaskImage3D to change this at any time.

You can supply a frame number if the image was loaded with LoadAnimImage3D()

A note about using the optional z parameter:
Because you need to give a frame number before the z parameter use 0 if you have no animation frames.

See Also: FreeImage3D

Example

Include "Sprite Control.bb"

SpriteGraphics3D 640,480

mysprite=LoadImage3D("myimage.bmp")
DrawImage3D mysprite,150,183

RenderWorld
Flip
WaitKey
End


Index