Compartir a través de


Sprite.Draw Method (Texture, Vector3, Vector3, Int32)

Adds a sprite to the list of batched sprites.

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

Syntax

'Declaration
Public Sub Draw ( _
    srcTexture As Texture, _
    center As Vector3, _
    position As Vector3, _
    color As Integer _
)
'Usage
Dim instance As Sprite
Dim srcTexture As Texture
Dim center As Vector3
Dim position As Vector3
Dim color As Integer

instance.Draw(srcTexture, center, position, color)
public void Draw (
    Texture srcTexture,
    Vector3 center,
    Vector3 position,
    int color
)
public:
void Draw (
    Texture^ srcTexture, 
    Vector3 center, 
    Vector3 position, 
    int color
)
public void Draw (
    Texture srcTexture, 
    Vector3 center, 
    Vector3 position, 
    int color
)
public function Draw (
    srcTexture : Texture, 
    center : Vector3, 
    position : Vector3, 
    color : int
)
Not applicable.

Parameters

  • srcTexture
    A Texture that represents the sprite texture.
  • center
    A Vector3 structure that identifies the center of the sprite. A value of (0,0,0) indicates the upper-left corner.
  • position
    A Vector3 structure that identifies the position of the sprite. A value of (0,0,0) indicates the upper-left corner.
  • color
    Color value represented as an integer. The color and alpha channels are modulated by this value. A value of 16777215 maintains the original source color and alpha data.

Exceptions

Exception type Condition

InvalidCallException

The method call is invalid. For example, a method's parameter may contain an invalid value.

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Sprite Class
Sprite Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace