C# Class Sparrow.Display.Image

Inheritance: Quad
Afficher le fichier Open project: fmotagarcia/sparrow-sharp

Méthodes publiques

Méthode Description
Image ( Texture texture ) : System

Initialize a quad with a texture mapped onto it

ReadjustSize ( ) : void

Readjusts the dimensions of the image according to its current texture. Call this method to synchronize image and texture size after assigning a texture with a different size.

SetTexCoords ( Point coords, int vertexID ) : void

Sets the texture coordinates of a vertex. Coordinates are in the range [0, 1].

SetTexCoords ( float x, float y, int vertexID ) : void

Sets the texture coordinates of a vertex. Coordinates are in the range [0, 1].

TexCoordsOfVertex ( int vertexID ) : Point

Gets the texture coordinates of a vertex.

Méthodes protégées

Méthode Description
Image ( ) : System
InitImage ( Texture texture ) : void
VertexDataDidChange ( ) : void

Private Methods

Méthode Description
CopyVertexDataTo ( VertexData targetData, int atIndex, bool copyColor ) : void

Method Details

Image() protected méthode

protected Image ( ) : System
Résultat System

Image() public méthode

Initialize a quad with a texture mapped onto it
public Image ( Texture texture ) : System
texture Sparrow.Textures.Texture The texture to use. Use for example the TextureLoader class to load one.
Résultat System

InitImage() protected méthode

protected InitImage ( Texture texture ) : void
texture Sparrow.Textures.Texture
Résultat void

ReadjustSize() public méthode

Readjusts the dimensions of the image according to its current texture. Call this method to synchronize image and texture size after assigning a texture with a different size.
public ReadjustSize ( ) : void
Résultat void

SetTexCoords() public méthode

Sets the texture coordinates of a vertex. Coordinates are in the range [0, 1].
public SetTexCoords ( Point coords, int vertexID ) : void
coords Point
vertexID int
Résultat void

SetTexCoords() public méthode

Sets the texture coordinates of a vertex. Coordinates are in the range [0, 1].
public SetTexCoords ( float x, float y, int vertexID ) : void
x float
y float
vertexID int
Résultat void

TexCoordsOfVertex() public méthode

Gets the texture coordinates of a vertex.
public TexCoordsOfVertex ( int vertexID ) : Point
vertexID int
Résultat Point

VertexDataDidChange() protected méthode

protected VertexDataDidChange ( ) : void
Résultat void