is the low-level class for loading and manipulating images.
|
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 Uint8 *Data) |
| | Construct the image from pixels in memory.
|
| | ~Image () |
| | Destructor.
|
| bool | LoadFromFile (const std::string &Filename) |
| | Load the image from a file.
|
| bool | LoadFromMemory (const char *Data, std::size_t SizeInBytes) |
| | Load the image from a file in memory.
|
| bool | LoadFromPixels (unsigned int Width, unsigned int Height, const Uint8 *Data) |
| | Load the image directly from an array of pixels.
|
| bool | SaveToFile (const std::string &Filename) const |
| | Save the content of the image to a file.
|
| bool | Create (unsigned int Width, unsigned int Height, Color Col=Color(0, 0, 0, 255)) |
| | Create an empty image.
|
| void | CreateMaskFromColor (Color ColorKey, Uint8 Alpha=0) |
| | Create transparency mask from a specified colorkey.
|
| void | Copy (const Image &Source, unsigned int DestX, unsigned int DestY, const IntRect &SourceRect=IntRect(0, 0, 0, 0), bool ApplyAlpha=false) |
| | Copy pixels from another image onto this one.
|
| bool | CopyScreen (RenderWindow &Window, const IntRect &SourceRect=IntRect(0, 0, 0, 0)) |
| | Create the image from the current contents of the given window.
|
| void | SetPixel (unsigned int X, unsigned int Y, const Color &Col) |
| | Change the color of a pixel.
|
| const Color & | GetPixel (unsigned int X, unsigned int Y) const |
| | Get a pixel from the image.
|
| const Uint8 * | GetPixelsPtr () const |
| | Get a read-only pointer to the array of pixels (RGBA 8 bits integers components) Array size is GetWidth() x GetHeight() x 4 This pointer becomes invalid if you reload or resize the image.
|
| void | Bind () const |
| | Bind the image for rendering.
|
| void | SetSmooth (bool Smooth) |
| | Enable or disable image smooth filter.
|
| unsigned int | GetWidth () const |
| | Return the width of the image.
|
| unsigned int | GetHeight () const |
| | Return the height of the image.
|
| bool | IsSmooth () const |
| | Tells whether the smooth filtering is enabled or not.
|
| 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.
|
is the low-level class for loading and manipulating images.