#include <Texture.h>
Structors | |
| SubTexture () | |
| SubTexture (const boost::shared_ptr< const Texture > &texture, int x1, int y1, int x2, int y2) | |
| SubTexture (const SubTexture &rhs) | |
| const SubTexture & | operator= (const SubTexture &rhs) |
| virtual | ~SubTexture () |
Accessors | |
| bool | Empty () const |
| const GLfloat * | TexCoords () const |
| GLint | Width () const |
| GLint | 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) | |
Definition at line 149 of file Texture.h.
| GG::SubTexture::SubTexture | ( | ) |
default ctor
| GG::SubTexture::SubTexture | ( | const boost::shared_ptr< const Texture > & | texture, | |
| int | x1, | |||
| int | y1, | |||
| int | x2, | |||
| int | 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. |
| GG::SubTexture::SubTexture | ( | const SubTexture & | rhs | ) |
copy ctor
| virtual GG::SubTexture::~SubTexture | ( | ) | [virtual] |
virtual dtor
| const SubTexture& GG::SubTexture::operator= | ( | const SubTexture & | rhs | ) |
assignment operator
| bool GG::SubTexture::Empty | ( | ) | const |
returns true if this object has no associated GG::Texture
| const GLfloat* GG::SubTexture::TexCoords | ( | ) | const |
texture coordinates to use when blitting this sub-texture
| GLint GG::SubTexture::Width | ( | ) | const |
width of sub-texture in pixels
| GLint GG::SubTexture::Height | ( | ) | const |
height of sub-texture in pixels
| const Texture* GG::SubTexture::GetTexture | ( | ) | const |
returns the texture the SubTexture is a part of
| void GG::SubTexture::OrthoBlit | ( | const Pt & | pt | ) | const |
| 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.5.2