NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

TGA_Image Class Reference
[Image creation]

#include <tga_image.h>

Collaboration diagram for TGA_Image:

List of all members.

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


Detailed Description

Class for creating and storing TGA image files.

Definition at line 136 of file tga_image.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


The documentation for this class was generated from the following files:

Generated on Fri Jun 18 16:12:29 2010 for LevelS C++ support library
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650