C# Class Sparrow.Display.Image

Inheritance: Quad
Mostrar archivo Open project: fmotagarcia/sparrow-sharp

Public Methods

Method 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.

Protected Methods

Method Description
Image ( ) : System
InitImage ( Texture texture ) : void
VertexDataDidChange ( ) : void

Private Methods

Method Description
CopyVertexDataTo ( VertexData targetData, int atIndex, bool copyColor ) : void

Method Details

Image() protected method

protected Image ( ) : System
return System

Image() public method

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.
return System

InitImage() protected method

protected InitImage ( Texture texture ) : void
texture Sparrow.Textures.Texture
return void

ReadjustSize() public method

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
return void

SetTexCoords() public method

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
return void

SetTexCoords() public method

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
return void

TexCoordsOfVertex() public method

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

VertexDataDidChange() protected method

protected VertexDataDidChange ( ) : void
return void