A class to deal with images.
More...
#include <image.hpp>
A class to deal with images.
- Author
- Julien Jorge
Definition at line 50 of file image.hpp.
◆ const_iterator
The type of the iterator to access constant pixels.
The pixels are accessed from the top line to the bottom line, and from the left to the right.
Definition at line 203 of file image.hpp.
◆ iterator
The type of the iterator on the pixels of the image.
The pixels are accessed from the top line to the bottom line, and from the left to the right.
Definition at line 195 of file image.hpp.
◆ image() [1/3]
claw::graphic::image::image |
( |
| ) |
|
◆ image() [2/3]
claw::graphic::image::image |
( |
unsigned int |
w, |
|
|
unsigned int |
h |
|
) |
| |
Constructor. Creates an empty image.
- Parameters
-
w | Image's width. |
h | Image's height. |
- Precondition
- w > 0 and h > 0
Definition at line 113 of file image.cpp.
◆ image() [3/3]
claw::graphic::image::image |
( |
std::istream & |
f | ) |
|
Constructor. Reads an image from an input stream.
- Parameters
-
f | The stream to read from. |
Definition at line 102 of file image.cpp.
◆ fill()
Fill an area of the image with a given color.
- Parameters
-
r | The area to fill. |
c | The color to fill with. |
Definition at line 286 of file image.cpp.
◆ load()
void claw::graphic::image::load |
( |
std::istream & |
f | ) |
|
Read the image from a stream.
- Parameters
-
f | The stream to read from. |
Definition at line 350 of file image.cpp.
◆ merge() [1/2]
void claw::graphic::image::merge |
( |
const image & |
that | ) |
|
Merge an image on the current image.
- Parameters
-
Definition at line 182 of file image.cpp.
◆ merge() [2/2]
Merge an image on the current image.
- Parameters
-
that | The image to merge. |
pos | The position of the top left corner. |
Definition at line 192 of file image.cpp.
◆ partial_copy()
Copy an image on the current image.
- Parameters
-
that | The image to copy. |
pos | The position of the top left corner. |
Definition at line 245 of file image.cpp.
◆ set_size()
void claw::graphic::image::set_size |
( |
unsigned int |
w, |
|
|
unsigned int |
h |
|
) |
| |
Set a new size to the image.
- Precondition
- (w!=0) && (h!=0)
Definition at line 333 of file image.cpp.
◆ swap()
void claw::graphic::image::swap |
( |
image & |
that | ) |
|
Swap the content of two images.
- Parameters
-
that | The image to swap with. |
Definition at line 122 of file image.cpp.
The documentation for this class was generated from the following files: