sprite=GrabImage3D(x,y,width,height[,parent])

Parameters

x - horizontal screen coordinate pixel
y - vertical screen coordinate pixel
width - width (in pixels) of image
height - height (in pixels) of image

parent (optional) - give an alternative entity in which to attach the sprite to
By default the parent is the pivot as created by:
SpriteGraphics3D or CreateSpritePivot()

Description

Grabs an area of the current graphics buffer as defined by x,y,width,height and creates a sprite image.
The newly created sprites handle is then returned.

* NOTE: It is important to initialise the sprite display system first!
See SpriteGraphics3D or CreateSpritePivot()

Alternatively, you might want to attach the sprite to your own pivot/entity.
If so, just pass it's handle to the optional parent parameter.

See Also: FreeImage3D

Example

Include "Sprite Control.bb"

SpriteGraphics3D 640,480

For d=1 to 100
Line Rand(640),Rand(480),Rand(640),Rand(480)
Next

mysprite=GrabImage3D(10,20,164,218)
DrawImage3D mysprite,72,50
RenderWorld
Flip
WaitKey
End


Index