Class TGUISpriteBank

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGUISpriteBank = class(TReferenceCounted)

Description

Sprite bank interface.
See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank for more information how to use the spritebank.

Hierarchy

Overview

Methods

Public function AddTextureAsSprite(Texture: TTexture): LongInt; inline;
Public function GetPosition(Index: LongWord): TRect; inline;
Public function GetSprite(Index: LongWord): TGUISprite; inline;
Public function GetTexture(Index: LongWord): TTexture; inline;
Public procedure AddTexture(Texture: TTexture); inline;
Public procedure Clear; inline;
Public procedure Draw2DSprite(Index: LongWord; const Pos: TPoint; const ClipRect: TRect; Color: TARGBColor = $ffffffff; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = True; Center: Boolean = False); overload; inline;
Public procedure Draw2DSprite(Index: LongWord; const Pos: TPoint); overload; inline;
Public procedure Draw2DSpriteBatch(const Indices: array of LongWord; const Positions: array of TPoint; const ClipRect: TRect; Color: TARGBColor = $ffffffff; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = True; Center: Boolean = False); overload;
Public procedure Draw2DSpriteBatch(const Indices: array of LongWord; const Positions: array of TPoint); overload;
Public procedure SetTexture(Index: LongWord; Texture: TTexture); inline;

Properties

Public property PositionCount: LongWord read GetPositionCount;
Public property SpriteCount: LongWord read GetSpriteCount;
Public property TextureCount: LongWord read GetTextureCount;

Description

Methods

Public function AddTextureAsSprite(Texture: TTexture): LongInt; inline;

Add the texture and use it for a single non-animated sprite.
The texture and the corresponding rectangle and sprite will all be added to the end of each array.

Returns

The index of the sprite or -1 on failure.

Public function GetPosition(Index: LongWord): TRect; inline;

Fetches a target position.

Parameters
Index
The zero-based index of the position to be returned.
Public function GetSprite(Index: LongWord): TGUISprite; inline;

Fetches a sprite.

Parameters
Index
The zero-based index of the sprite to be returned.
Public function GetTexture(Index: LongWord): TTexture; inline;

Fetches a texture.

Parameters
Index
The zero-based index of the texture. to be returned.
Public procedure AddTexture(Texture: TTexture); inline;

Adds a texture to the sprite bank.

Parameters
Texture
The texture to add.
Public procedure Clear; inline;

Clears all sprites, rectangles and textures

Public procedure Draw2DSprite(Index: LongWord; const Pos: TPoint; const ClipRect: TRect; Color: TARGBColor = $ffffffff; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = True; Center: Boolean = False); overload; inline;

Draws a sprite, clipping it to a given rectangle.

Parameters
Index
The zero-based index of the sprite do draw.
Pos
The top-left position of the target area.
ClipRect
The clipping rectangle.
Color
(Undocumented).
StartTime
(Undocumented).
CurrentTime
(Undocumented).
Loop
(Undocumented).
Center
(Undocumented).
Public procedure Draw2DSprite(Index: LongWord; const Pos: TPoint); overload; inline;

Draws a sprite.
Overloaded for default parameters.

Parameters
Index
The zero-based index of the sprite do draw.
Pos
The top-left position of the target area.
Public procedure Draw2DSpriteBatch(const Indices: array of LongWord; const Positions: array of TPoint; const ClipRect: TRect; Color: TARGBColor = $ffffffff; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = True; Center: Boolean = False); overload;

Draws multiple indices, clipping them to a single rectangle.

Parameters
Indices
Array of zero-based indices of the sprites do draw.
Positions
Array of top-left target positions.
ClipRect
The clipping rectangle for all sprites.
Color
(Undocumented).
StartTime
(Undocumented).
CurrentTime
(Undocumented).
Loop
(Undocumented).
Center
(Undocumented).
Public procedure Draw2DSpriteBatch(const Indices: array of LongWord; const Positions: array of TPoint); overload;

Draws multiple indices.
Overloaded for default parameters.

Parameters
Indices
Array of zero-based indices of the sprites do draw.
Positions
Array of top-left target positions.
Public procedure SetTexture(Index: LongWord; Texture: TTexture); inline;

Changes one of the textures in the sprite bank.

Parameters
Index
The zero-based index of the texture to reset.
Texture
The new texture.

Properties

Public property PositionCount: LongWord read GetPositionCount;

Returns the number of target positions.

Public property SpriteCount: LongWord read GetSpriteCount;

Returns the number of sprites.

Public property TextureCount: LongWord read GetTextureCount;

Returns the number of textures in the bank.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22