Microsoft DirectX 8.1 (Visual Basic) |
Provides a mechanism for drawing a sprite that is transformed by a specified matrix.
object.DrawTransform( _ SrcTexture As Direct3DTexture8, _ SrcRect As Any, _ TransformMatrix As D3DMATRIX, _ Color As Long)
Before transformation, the size of the sprite is defined by SrcRect with the top-left corner at the origin (0,0).
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
This method must be called between an Direct3DDevice8.BeginScene and Direct3DDevice8.EndScene pair.
If D3DXSprite.Begin has not been called, this method internally calls Begin and D3DXSprite.End. When making successive calls to D3DXSprite.Draw and/or D3DXSprite.DrawTransform, be sure to call Begin to avoid the extra overhead of Draw and DrawTransform internally calling Begin and End each time.