C# Class Sparrow.Textures.SubTexture

A SubTexture represents a section of another texture. This is achieved solely by manipulation of texture coordinates, making the class very efficient. Note that it is OK to create subtextures of subtextures.
Inheritance: Texture
Afficher le fichier Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Méthodes publiques

Méthode Description
AdjustPositions ( VertexData vertexData, uint startIndex, uint count ) : void
AdjustTexCoords ( VertexData vertexData, uint startIndex, uint count ) : void
AdjustVertexData ( VertexData vertexData, uint startIndex, uint count ) : void
SubTexture ( Texture texture, Rectangle region = null, Rectangle frame = null, bool rotated = false ) : System

Initializes a subtexture with a region (in points) of another texture, using a frame rectangle to place the texture within an image. If 'rotated' is 'true', the subtexture will show the base region rotated by 90 degrees (CCW). If frame is null, it will use the whole texture.

Méthodes protégées

Méthode Description
Init ( Texture texture, Rectangle region = null, Rectangle frame = null, bool rotated = false ) : void
SubTexture ( ) : System

Private Methods

Méthode Description
TransformVector2 ( Matrix matrix, System.Vector2 vector ) : System.Vector2

Method Details

AdjustPositions() public méthode

public AdjustPositions ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Résultat void

AdjustTexCoords() public méthode

public AdjustTexCoords ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Résultat void

AdjustVertexData() public méthode

public AdjustVertexData ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Résultat void

Init() protected méthode

protected Init ( Texture texture, Rectangle region = null, Rectangle frame = null, bool rotated = false ) : void
texture Texture
region Sparrow.Geom.Rectangle
frame Sparrow.Geom.Rectangle
rotated bool
Résultat void

SubTexture() protected méthode

protected SubTexture ( ) : System
Résultat System

SubTexture() public méthode

Initializes a subtexture with a region (in points) of another texture, using a frame rectangle to place the texture within an image. If 'rotated' is 'true', the subtexture will show the base region rotated by 90 degrees (CCW). If frame is null, it will use the whole texture.
public SubTexture ( Texture texture, Rectangle region = null, Rectangle frame = null, bool rotated = false ) : System
texture Texture
region Sparrow.Geom.Rectangle
frame Sparrow.Geom.Rectangle
rotated bool
Résultat System