C# 클래스 SFML.Graphics.Sprite

This class defines a sprite : texture, transformations, color, and draw on screen
See also the note on coordinates and undistorted rendering in SFML.Graphics.Transformable.
상속: Transformable, Drawable
파일 보기 프로젝트 열기: SFML/SFML.Net 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( RenderTarget target, RenderStates states ) : void

Draw the sprite to a render target

GetGlobalBounds ( ) : FloatRect

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.

GetLocalBounds ( ) : FloatRect

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.

Sprite ( ) : System

Default constructor

Sprite ( Sprite copy ) : System

Construct the sprite from another sprite

Sprite ( Texture texture ) : System

Construct the sprite from a source texture

Sprite ( Texture texture, IntRect rectangle ) : System

Construct the sprite from a source texture

ToString ( ) : string

Provide a string describing the object

보호된 메소드들

메소드 설명
Destroy ( bool disposing ) : void

Handle the destruction of the object

비공개 메소드들

메소드 설명
sfRenderTexture_drawSprite ( IntPtr CPointer, IntPtr Sprite, RenderStates &states ) : void
sfRenderWindow_drawSprite ( IntPtr CPointer, IntPtr Sprite, RenderStates &states ) : void
sfSprite_copy ( IntPtr Sprite ) : IntPtr
sfSprite_create ( ) : IntPtr
sfSprite_destroy ( IntPtr CPointer ) : void
sfSprite_getColor ( IntPtr CPointer ) : Color
sfSprite_getLocalBounds ( IntPtr CPointer ) : FloatRect
sfSprite_getTextureRect ( IntPtr CPointer ) : IntRect
sfSprite_setColor ( IntPtr CPointer, Color Color ) : void
sfSprite_setTexture ( IntPtr CPointer, IntPtr Texture, bool AdjustToNewSize ) : void
sfSprite_setTextureRect ( IntPtr CPointer, IntRect Rect ) : void

메소드 상세

Destroy() 보호된 메소드

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
리턴 void

Draw() 공개 메소드

Draw the sprite to a render target
public Draw ( RenderTarget target, RenderStates states ) : void
target RenderTarget Render target to draw to
states RenderStates Current render states
리턴 void

GetGlobalBounds() 공개 메소드

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.
public GetGlobalBounds ( ) : FloatRect
리턴 FloatRect

GetLocalBounds() 공개 메소드

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
public GetLocalBounds ( ) : FloatRect
리턴 FloatRect

Sprite() 공개 메소드

Default constructor
public Sprite ( ) : System
리턴 System

Sprite() 공개 메소드

Construct the sprite from another sprite
public Sprite ( Sprite copy ) : System
copy Sprite Sprite to copy
리턴 System

Sprite() 공개 메소드

Construct the sprite from a source texture
public Sprite ( Texture texture ) : System
texture Texture Source texture to assign to the sprite
리턴 System

Sprite() 공개 메소드

Construct the sprite from a source texture
public Sprite ( Texture texture, IntRect rectangle ) : System
texture Texture Source texture to assign to the sprite
rectangle IntRect Sub-rectangle of the texture to assign to the sprite
리턴 System

ToString() 공개 메소드

Provide a string describing the object
public ToString ( ) : string
리턴 string