25 #ifndef SFML_IMAGE_HPP
26 #define SFML_IMAGE_HPP
31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Color.hpp>
33 #include <SFML/Graphics/Rect.hpp>
66 void create(
unsigned int width,
unsigned int height,
const Color& color =
Color(0, 0, 0));
81 void create(
unsigned int width,
unsigned int height,
const Uint8* pixels);
98 bool loadFromFile(
const std::string& filename);
116 bool loadFromMemory(
const void* data, std::size_t size);
150 bool saveToFile(
const std::string& filename)
const;
171 void createMaskFromColor(
const Color& color, Uint8 alpha = 0);
193 void copy(
const Image& source,
unsigned int destX,
unsigned int destY,
const IntRect& sourceRect =
IntRect(0, 0, 0, 0),
bool applyAlpha =
false);
209 void setPixel(
unsigned int x,
unsigned int y,
const Color& color);
226 Color getPixel(
unsigned int x,
unsigned int y)
const;
241 const Uint8* getPixelsPtr()
const;
247 void flipHorizontally();
253 void flipVertically();
261 std::vector<Uint8> m_pixels;
267 #endif // SFML_IMAGE_HPP