#include <ls_image.h>
Public Member Functions | |
LS_Image () | |
LS_Image (int xres, int yres) | |
~LS_Image () | |
void | fill (const Colour &col) |
void | set_font (const MP_Font &fnt) |
void | annotate (int xpos, int ypos, const Colour &col, const std::string &text, int scale=1) |
void | annotate_centered (int xpos, int ypos, const Colour &col, const std::string &text, int scale=1) |
void | put_pixel (tsize i, tsize j, const Colour &col) |
Colour8 | get_pixel (tsize i, tsize j) |
void | write_TGA (const std::string &file) const |
void | write_TGA_rle (const std::string &file) const |
void | write_PPM (const std::string &file) const |
Definition at line 103 of file ls_image.h.
LS_Image::LS_Image | ( | ) |
Definition at line 121 of file ls_image.cc.
LS_Image::LS_Image | ( | int | xres, | |
int | yres | |||
) |
Creates an image object with a resolution of xres by yres.
Definition at line 124 of file ls_image.cc.
LS_Image::~LS_Image | ( | ) | [inline] |
Definition at line 118 of file ls_image.h.
void LS_Image::fill | ( | const Colour & | col | ) | [inline] |
Fills the entire image with colour col.
Definition at line 121 of file ls_image.h.
void LS_Image::set_font | ( | const MP_Font & | fnt | ) |
Sets the font used for annotations to fnt.
Definition at line 142 of file ls_image.cc.
void LS_Image::annotate | ( | int | xpos, | |
int | ypos, | |||
const Colour & | col, | |||
const std::string & | text, | |||
int | scale = 1 | |||
) |
Outputs the string text in colour col. xpos, ypos is the lower left corner; the font is scaled by scale.
void LS_Image::annotate_centered | ( | int | xpos, | |
int | ypos, | |||
const Colour & | col, | |||
const std::string & | text, | |||
int | scale = 1 | |||
) |
Outputs the string text centered at position xpos, ypos in colour col. The font is scaled by scale.
Sets the pixel i, j, to the colour col.
Definition at line 134 of file ls_image.h.
Returns the colour of the pixel i, j, or black if the pixel lies outside of the image.
Definition at line 141 of file ls_image.h.
void LS_Image::write_TGA | ( | const std::string & | file | ) | const |
Writes the image to file in uncompressed TGA format.
void LS_Image::write_TGA_rle | ( | const std::string & | file | ) | const |
Writes the image to file in run-length encoded TGA format.
void LS_Image::write_PPM | ( | const std::string & | file | ) | const |
Writes the image to file in binary PPM format.