![]() |
![]() |
![]() |
Adds a sprite to the list of batched sprites.
Syntax
HRESULT Draw(
LPDIRECT3DTEXTURE9 pTexture, CONST RECT *pSrcRect, CONST D3DXVECTOR3 *pCenter, CONST D3DXVECTOR3 *pPosition, D3DCOLOR Color );
Parameters
- pTexture
- [in] Pointer to an IDirect3DTexture9 interface that represents the sprite texture.
- pSrcRect
- [in] Pointer to a RECT
structure that indicates the portion of the source texture to use for the sprite. If this parameter is NULL, then the entire source image is used for the sprite.
- pCenter
- [in] Pointer to a D3DXVECTOR3 vector that identifies the center of the sprite. If this argument is NULL, the point (0,0,0) is used, which is the upper-left corner.
- pPosition
- [in] Pointer to a D3DXVECTOR3 vector that identifies the position of the sprite. If this argument is NULL, the point (0,0,0) is used, which is the upper-left corner.
- Color
- [in] D3DCOLOR type. The color and alpha channels are modulated by this value. A value of 0xFFFFFFFF maintains the original source color and alpha data. Use the D3DCOLOR_RGBA macro to help generate this color.
Return Value
If the method succeeds, the return value is S_OK.
If the method fails, the return value can be one of the following values.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. D3DXERR_INVALIDDATA The data is invalid.