|
Public Member Functions |
| Image () |
| Default constructor.
|
| Image (const Image &Copy) |
| Copy constructor.
|
| Image (unsigned int Width, unsigned int Height, const Color &Col=Color(0, 0, 0, 255)) |
| Construct an empty image.
|
| Image (unsigned int Width, unsigned int Height, const void *Data) |
| Construct the image from pixels in memory.
|
| ~Image () |
| Destructor.
|
bool | LoadFromFile (const std::string &Filename) |
| Load the image from a file.
|
bool | SaveToFile (const std::string &Filename) const |
| Save the content of the image to a file.
|
void | Create (unsigned int Width, unsigned int Height, const Color &Col=Color(0, 0, 0, 255)) |
| Create an empty image.
|
void | LoadFromMemory (unsigned int Width, unsigned int Height, const void *Data) |
| Load the image from pixels in memory.
|
void | CreateMaskFromColor (const Color &ColorKey, Uint8 Alpha=0) |
| Create transparency mask from a specified colorkey.
|
void | Resize (unsigned int Width, unsigned int Height, const Color &Col=Color(0, 0, 0, 255)) |
| Resize the image - warning : this function does not scale the image, it just ajdusts size (add padding or remove pixels).
|
void | SetPixel (unsigned int X, unsigned int Y, const Color &Col) |
| Change the color of a pixel Don't forget to call Update when you end modifying pixels.
|
Color | GetPixel (unsigned int X, unsigned int Y) const |
| Get a pixel from the image.
|
const Uint32 * | GetPixelsPtr () const |
| Get a read-only pointer to the array of pixels (32 bits integer RGBA) Array size is GetWidth() x GetHeight() This pointer becomes invalid if you reload or resize the image.
|
void | Update () |
| Update the whole image in video memory.
|
void | Bind () const |
| Bind the image for rendering.
|
void | SetSmooth (bool Smooth) const |
| Enable or disable image smoothing filter.
|
void | SetRepeat (bool Repeat) const |
| Enable or disable image repeat mode (ie.
|
unsigned int | GetWidth () const |
| Return the width of the image.
|
unsigned int | GetHeight () const |
| Return the height of the image.
|
FloatRect | GetTexCoords (const IntRect &Rect) const |
| Convert a subrect expressed in pixels, into float texture coordinates.
|
Image & | operator= (const Image &Other) |
| Assignment operator.
|
Static Public Member Functions |
static unsigned int | GetValidTextureSize (unsigned int Size) |
| Get a valid texture size according to hardware support.
|