|
Public Member Functions |
| sfImage () |
| Default constructor.
|
| sfImage (const sfImage &Copy) |
| Copy constructor.
|
| sfImage (unsigned int Width, unsigned int Height, const sfColor &Color=sfColor(0, 0, 0, 255)) |
| Construct an empty image.
|
| sfImage (unsigned int Width, unsigned int Height, const void *Data) |
| Construct the image from pixels in memory.
|
| ~sfImage () |
| Destructor.
|
bool | LoadFromFile (const std::string &Filename) |
| Load the surface 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 sfColor &Color=sfColor(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 sfColor &ColorKey) |
| Create transparency mask from a specified colorkey.
|
void | Resize (unsigned int Width, unsigned int Height, const sfColor &Color=sfColor(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 sfColor &Color) |
| Change the color of a pixel Don't forget to call Update when you end modifying pixels.
|
sfColor | GetPixel (unsigned int X, unsigned int Y) const |
| Get a pixel from the image.
|
const sfUint32 * | 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 image in video memory (use when you have modified pixels manually).
|
void | Bind () const |
| Bind the image for rendering.
|
void | SetSmooth (bool Smooth) const |
| Enable or disable image smooth 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.
|
sfFloatRect | GetTexCoords (const sfIntRect &Rect) const |
| Convert a subrect expressed in pixels, into float texture coordinates.
|
sfImage & | operator= (const sfImage &Other) |
| Assignment operator.
|
Static Public Member Functions |
static unsigned int | GetValidTextureSize (unsigned int Size) |
| Get a valid texture size according to hardware support.
|