|
GG
|
#include <Texture.h>
Structors | |
| SubTexture () | |
| SubTexture (const boost::shared_ptr< const Texture > &texture, X x1, Y y1, X x2, Y y2) | |
| SubTexture (const SubTexture &rhs) | |
| const SubTexture & | operator= (const SubTexture &rhs) |
| virtual | ~SubTexture () |
Accessors | |
| bool | Empty () const |
| const GLfloat * | TexCoords () const |
| X | Width () const |
| Y | Height () const |
| const Texture * | GetTexture () const |
| void | OrthoBlit (const Pt &pt1, const Pt &pt2) const |
| void | OrthoBlit (const Pt &pt) const |
Exceptions | |
| GG_ABSTRACT_EXCEPTION (Exception) | |
| GG_CONCRETE_EXCEPTION (BadTexture, GG::SubTexture, Exception) | |
| GG_CONCRETE_EXCEPTION (InvalidTextureCoordinates, GG::SubTexture, Exception) | |
This class is a convenient way to store the info needed to use a portion of an OpenGL texture.
| GG::SubTexture::SubTexture | ( | const boost::shared_ptr< const Texture > & | texture, |
| X | x1, | ||
| Y | y1, | ||
| X | x2, | ||
| Y | y2 | ||
| ) |
Creates a SubTexture from a GG::Texture and coordinates into it.
| GG::SubTexture::BadTexture | Throws if the given Texture is null. |
| GG::SubTexture::InvalidTextureCoordinates | Throws if the texture coordinates are not well formed. |
Blit sub-texture to any place on screen, scaling as necessary
| void GG::SubTexture::OrthoBlit | ( | const Pt & | pt | ) | const |
Blit sub-texture unscaled to pt (upper left corner)
| GG::SubTexture::GG_ABSTRACT_EXCEPTION | ( | Exception | ) |
The base class for SubTexture exceptions.
| GG::SubTexture::GG_CONCRETE_EXCEPTION | ( | BadTexture | , |
| GG::SubTexture | , | ||
| Exception | |||
| ) |
Thrown when an attempt is made to create a SubTexture using a null texture.
| GG::SubTexture::GG_CONCRETE_EXCEPTION | ( | InvalidTextureCoordinates | , |
| GG::SubTexture | , | ||
| Exception | |||
| ) |
Thrown when invalid or out-of-order texture coordinates are supplied.
1.8.3