Share via


Sprite.Draw Method (Texture, Rectangle, 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, _
    srcRectangle As Rectangle, _
    center As Vector3, _
    position As Vector3, _
    color As Integer _
)
'Usage
Dim instance As Sprite
Dim srcTexture As Texture
Dim srcRectangle As Rectangle
Dim center As Vector3
Dim position As Vector3
Dim color As Integer

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

Parameters

  • srcTexture
    A Texture that represents the sprite texture.
  • srcRectangle
    A Rectangle object that indicates the portion of the source texture to use for the sprite. Specify Empty to use the entire source image for the sprite.
  • 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.

.NET Framework Security

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

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