![]() |
![]() |
![]() |
|||||||||||||||||
![]() |
![]() |
![]() |
|||||||||||||||||
![]() |
|
![]() |
|||||||||||||||||
![]() |
![]() |
![]() |
![]() |
TGA_Image Class Reference |
Public Member Functions | |
TGA_Image () | |
TGA_Image (int xres, int yres) | |
~TGA_Image () | |
void | fill (const Colour &col) |
void | set_font (const 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 (int i, int j, const Colour &col) |
Colour8 | get_pixel (int i, int j) |
void | write (const std::string &file) const |
Definition at line 136 of file tga_image.h.
TGA_Image::TGA_Image | ( | ) |
Definition at line 85 of file tga_image.cc.
TGA_Image::TGA_Image | ( | int | xres, | |
int | yres | |||
) |
Creates an image object with a resolution of xres by yres.
Definition at line 88 of file tga_image.cc.
TGA_Image::~TGA_Image | ( | ) | [inline] |
Definition at line 151 of file tga_image.h.
void TGA_Image::fill | ( | const Colour & | col | ) | [inline] |
Fills the entire image with colour col.
Definition at line 154 of file tga_image.h.
void TGA_Image::set_font | ( | const Font & | fnt | ) |
Sets the font used for annotations to fnt.
Definition at line 109 of file tga_image.cc.
void TGA_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 TGA_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.
void TGA_Image::put_pixel | ( | int | i, | |
int | j, | |||
const Colour & | col | |||
) | [inline] |
Sets the pixel i, j, to the colour col.
Definition at line 167 of file tga_image.h.
Colour8 TGA_Image::get_pixel | ( | int | i, | |
int | j | |||
) | [inline] |
Returns the colour of the pixel i, j, or black if the pixel lies outside of the image.
Definition at line 174 of file tga_image.h.
void TGA_Image::write | ( | const std::string & | file | ) | const |
Writes the image to file.
![]() |
![]() |
![]() |
||||
![]() |
|
![]() |
||||
![]() |
![]() |
![]() |
||||
![]() |
|
![]() |
||||
![]() |
![]() |
![]() |
||||
![]() |
![]() |
![]() |