3 #ifndef IMAGE_DISPLAY_H_INCLUDED
4 #define IMAGE_DISPLAY_H_INCLUDED
45 ImageDisplay(
const std::string& windowName,
unsigned int width,
unsigned int height);
68 void set(
int x,
int y,
const Colour& colour);
88 void save(
const std::string& filename)
const;
97 void pause(
double seconds);
Colour class header file.
NonCopyable class header file.
Class to store colour information.
Definition: Colour.h:25
Class to display and save images.
Definition: ImageDisplay.h:29
ImageDisplay(const std::string &windowName, unsigned int width, unsigned int height)
ImageDisplay constructor.
Definition: ImageDisplay.cpp:6
void save(const std::string &filename) const
Save an image to file.
Definition: ImageDisplay.cpp:26
void set(int x, int y, const Colour &colour)
Set a pixel value.
Definition: ImageDisplay.cpp:15
size_t height_
Height of the image.
Definition: ImageDisplay.h:103
size_t lastRowWritten_
Last row rendered, for the purpose of progress reporting.
Definition: ImageDisplay.h:104
size_t width_
Width of the image.
Definition: ImageDisplay.h:102
void pause(double seconds)
Wait for a specified duration.
Definition: ImageDisplay.cpp:30
std::vector< unsigned char > image_
Internal storage of the image to render to.
Definition: ImageDisplay.h:101
~ImageDisplay()
ImageDisplay destructor.
Definition: ImageDisplay.cpp:12
void refresh()
Update the window displaying the image.
Definition: ImageDisplay.cpp:22
NonCopyable class.
Definition: NonCopyable.h:27