1. Trang chủ
  2. » Công Nghệ Thông Tin

DRAW XNA TIENG ANH

8 226 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 8
Dung lượng 1,15 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

DRAW XNA TIENG ANH tập hợp tất cả các lệnh draw trong xna 4.0 cho các bạn có thể hiểu tiếng anh. dùng tham khảo rất tiện dụng. ngoài ra bạn có thể tìm thêm DRAW XNA TIENG VIET có phần giải thích từng lệnh draw bằng tiếng việt.

Trang 1

7/17/2017 SpriteBatch.Draw Method

SpriteBatch.Draw Method

Adds a sprite to a batch of sprites to be rendered

Overload List

SpriteBatch.Draw (Texture2D, Rectangle, Color) Adds a sprite to a batch of sprites for rendering using the specified texture, destination

rectangle, and color

SpriteBatch.Draw (Texture2D, Rectangle, Nullable<Rectangle>,

Color) Adds a sprite to a batch of sprites for rendering using the specified texture, destinationrectangle, source rectangle, and color

SpriteBatch.Draw (Texture2D, Rectangle, Nullable<Rectangle>,

Color, Single, Vector2, SpriteEffects, Single) Adds a sprite to a batch of sprites for rendering using the specified texture, destinationrectangle, source rectangle, color, rotation, origin, effects and layer

SpriteBatch.Draw (Texture2D, Vector2, Color) Adds a sprite to a batch of sprites for rendering using the specified texture, position and color

SpriteBatch.Draw (Texture2D, Vector2, Nullable<Rectangle>, Color) Adds a sprite to a batch of sprites for rendering using the specified texture, position, source

rectangle, and color

SpriteBatch.Draw (Texture2D, Vector2, Nullable<Rectangle>, Color,

Single, Vector2, Single, SpriteEffects, Single) Adds a sprite to a batch of sprites for rendering using the specified texture, position, sourcerectangle, color, rotation, origin, scale, effects, and layer

SpriteBatch.Draw (Texture2D, Vector2, Nullable<Rectangle>, Color,

Single, Vector2, Vector2, SpriteEffects, Single) Adds a sprite to a batch of sprites for rendering using the specified texture, position, sourcerectangle, color, rotation, origin, scale, effects and layer

See Also

XNA Game Studio 4.0

Trang 2

7/17/2017 SpriteBatch.Draw Method (Texture2D, Rectangle, Color)

SpriteBatch.Draw Method (Texture2D,

Rectangle, Color)

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, and color

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

destinationRectangle

A rectangle that specifies (in screen coordinates) the destination for drawing the sprite

color

The color to tint a sprite Use Color.White for full color with no tinting

Exceptions

Exception type Condition

ArgumentNullExceptio

InvalidOperationExcep

tion Draw was called, but can call Draw Begin has not yet been called Begin must be called successfully before you

Remarks

Before making any calls to Draw, you must call Begin Once all calls to Draw are complete, call End

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Rectangle destinationRectangle,

Color color

)

C#

Trang 3

7/17/2017 SpriteBatch.Draw Method (Texture2D, Rectangle, Nullable<Rectangle>, Color)

SpriteBatch.Draw Method (Texture2D,

Rectangle, Nullable<Rectangle>, Color)

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, source rectangle, and color Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

destinationRectangle

A rectangle that specifies (in screen coordinates) the destination for drawing the sprite If this rectangle is not the same size as the source rectangle, the sprite will be scaled to fit

sourceRectangle

A rectangle that specifies (in texels) the source texels from a texture Use null to draw the entire texture

color

The color to tint a sprite Use Color.White for full color with no tinting

Exceptions

Exception type Condition

ArgumentNullExceptio

InvalidOperationExcep

tion Draw was called, but can call Draw Begin has not yet been called Begin must be called successfully before you

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Rectangle destinationRectangle,

Nullable<Rectangle> sourceRectangle,

Color color

)

C#

Trang 4

7/17/2017 SpriteBatch.Draw Method (Texture2D, Rectangle, Nullable<Rectangle>, Color, Single, Vector2, SpriteEffects, Single)

SpriteBatch.Draw Method (Texture2D,

Rectangle, Nullable<Rectangle>, Color, Single, Vector2, SpriteEffects, Single)

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, source rectangle, color,

rotation, origin, effects and layer

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

destinationRectangle

A rectangle that specifies (in screen coordinates) the destination for drawing the sprite If this rectangle is not the same size as the source rectangle, the sprite will be scaled to fit

sourceRectangle

A rectangle that specifies (in texels) the source texels from a texture Use null to draw the entire texture

color

The color to tint a sprite Use Color.White for full color with no tinting

rotation

Specifies the angle (in radians) to rotate the sprite about its center

origin

The sprite origin; the default is (0,0) which represents the upper-left corner

effects

Effects to apply

layerDepth

The depth of a layer By default, 0 represents the front layer and 1 represents a back layer Use SpriteSortMode if you want sprites to be sorted during drawing

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Rectangle destinationRectangle,

Nullable<Rectangle> sourceRectangle,

Color color,

float rotation,

Vector2 origin,

SpriteEffects effects,

float layerDepth

)

C#

Trang 5

7/17/2017 SpriteBatch.Draw Method (Texture2D, Vector2, Color)

SpriteBatch.Draw Method (Texture2D, Vector2, Color)

Adds a sprite to a batch of sprites for rendering using the specified texture, position and color

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

position

The location (in screen coordinates) to draw the sprite

color

The color to tint a sprite Use Color.White for full color with no tinting

Exceptions

Exception type Condition

ArgumentNullExceptio

InvalidOperationExcep

tion Draw was called, but can call Draw Begin has not yet been called Begin must be called successfully before you

Remarks

Before making any calls to Draw, you must call Begin Once all calls to Draw are complete, call End

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Vector2 position,

Color color

)

C#

Trang 6

7/17/2017 SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color)

SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color)

Adds a sprite to a batch of sprites for rendering using the specified texture, position, source rectangle, and color

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

position

The location (in screen coordinates) to draw the sprite

sourceRectangle

A rectangle that specifies (in texels) the source texels from a texture Use null to draw the entire texture

color

The color to tint a sprite Use Color.White for full color with no tinting

Exceptions

Exception type Condition

ArgumentNullExceptio

InvalidOperationExcep

tion Draw was called, but can call Draw Begin has not yet been called Begin must be called successfully before you

Remarks

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Vector2 position,

Nullable<Rectangle> sourceRectangle,

Color color

)

C#

Trang 7

7/17/2017 SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Single, SpriteEffects, Single)

SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Single, SpriteEffects, Single)

Adds a sprite to a batch of sprites for rendering using the specified texture, position, source rectangle, color, rotation, origin, scale, effects, and layer

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

position

The location (in screen coordinates) to draw the sprite

sourceRectangle

A rectangle that specifies (in texels) the source texels from a texture Use null to draw the entire texture

color

The color to tint a sprite Use Color.White for full color with no tinting

rotation

Specifies the angle (in radians) to rotate the sprite about its center

origin

The sprite origin; the default is (0,0) which represents the upper-left corner

scale

Scale factor

effects

Effects to apply

layerDepth

The depth of a layer By default, 0 represents the front layer and 1 represents a back layer Use SpriteSortMode if you want sprites to be sorted during drawing

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Vector2 position,

Nullable<Rectangle> sourceRectangle,

Color color,

float rotation,

Vector2 origin,

float scale,

SpriteEffects effects,

float layerDepth

)

C#

Trang 8

7/17/2017 SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Vector2, SpriteEffects, Single)

SpriteBatch.Draw Method (Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Vector2, SpriteEffects, Single)

Adds a sprite to a batch of sprites for rendering using the specified texture, position, source rectangle, color, rotation, origin, scale, effects and layer

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

Parameters

texture

A texture

position

The location (in screen coordinates) to draw the sprite

sourceRectangle

A rectangle that specifies (in texels) the source texels from a texture Use null to draw the entire texture

color

The color to tint a sprite Use Color.White for full color with no tinting

rotation

Specifies the angle (in radians) to rotate the sprite about its center

origin

The sprite origin; the default is (0,0) which represents the upper-left corner

scale

Scale factor

effects

Effects to apply

layerDepth

The depth of a layer By default, 0 represents the front layer and 1 represents a back layer Use SpriteSortMode if you want sprites to be sorted during drawing

XNA Game Studio 4.0

public void Draw (

Texture2D texture,

Vector2 position,

Nullable<Rectangle> sourceRectangle,

Color color,

float rotation,

Vector2 origin,

Vector2 scale,

SpriteEffects effects,

float layerDepth

)

C#

Ngày đăng: 19/07/2017, 13:41

Xem thêm

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w