C# Класс 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.
Наследование: Texture
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Init ( Texture texture, Rectangle region = null, Rectangle frame = null, bool rotated = false ) : void
SubTexture ( ) : System

Приватные методы

Метод Описание
TransformVector2 ( Matrix matrix, System.Vector2 vector ) : System.Vector2

Описание методов

AdjustPositions() публичный Метод

public AdjustPositions ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Результат void

AdjustTexCoords() публичный Метод

public AdjustTexCoords ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Результат void

AdjustVertexData() публичный Метод

public AdjustVertexData ( VertexData vertexData, uint startIndex, uint count ) : void
vertexData Sparrow.Utils.VertexData
startIndex uint
count uint
Результат void

Init() защищенный Метод

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
Результат void

SubTexture() защищенный Метод

protected SubTexture ( ) : System
Результат System

SubTexture() публичный Метод

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
Результат System