#include <TgaTool.h>
Public Member Functions | |
TGAImage (void) | |
virtual | ~TGAImage (void) |
void | init (void) |
グラフィックデータは解放しない | |
bool | isNull (void) |
グラフィックデータを持っていないか? | |
void | clear (void) |
全空間を画素値 0 にする | |
void | fill (uByte v=(uByte) 0) |
全空間を画素値 v にする | |
void | free (void) |
グラフィックデータを開放する | |
uByte & | point (int x, int y, int c) |
void | getm (int x, int y, int c) |
void | set (int x, int y, int c) |
Public Attributes | |
int | xs |
int | ys |
int | col |
int | state |
uByte | hd [TGA_HEADER_SIZE] |
uByte * | gp |
Definition at line 25 of file TgaTool.h.
TGAImage | ( | void | ) | [inline] |
Definition at line 37 of file TgaTool.h.
References TGAImage::init().
00037 { init();}
void clear | ( | void | ) |
Definition at line 50 of file TgaTool.cpp.
References TGAImage::col, TGAImage::gp, TGAImage::xs, and TGAImage::ys.
Definition at line 60 of file TgaTool.cpp.
References TGAImage::col, TGAImage::gp, TGAImage::xs, and TGAImage::ys.
void free | ( | void | ) |
void TGAImage::free(void)
グラフィックデータを開放する
Definition at line 74 of file TgaTool.cpp.
References TGAImage::gp, and TGAImage::init().
Referenced by jbxl::MSGraph2TGAImage(), and jbxl::readTGAData().
void getm | ( | int | x, | |
int | y, | |||
int | c | |||
) |
void TGAImage::getm(int x, int y, int c)
Definition at line 105 of file TgaTool.cpp.
References TGAImage::gp, JBXL_GRAPH_MEMORY_ERROR, and TGAImage::state.
Referenced by TGAImage::set().
00106 { 00107 gp = (uByte*)malloc(x*y*c); 00108 if (gp==NULL) { 00109 state = JBXL_GRAPH_MEMORY_ERROR; 00110 return; 00111 } 00112 00113 return; 00114 }
void init | ( | void | ) |
void TGAImage::init(void)
メンバ変数を初期化する.
Definition at line 22 of file TgaTool.cpp.
References TGAImage::col, TGAImage::gp, TGAImage::hd, TGAImage::state, TGA_HEADER_SIZE, TGAImage::xs, and TGAImage::ys.
Referenced by TGAImage::free(), and TGAImage::TGAImage().
00023 { 00024 xs = 0; 00025 ys = 0; 00026 col = 0; 00027 state = 0; 00028 gp = NULL; 00029 00030 memset(hd, 0, TGA_HEADER_SIZE); 00031 return; 00032 }
bool isNull | ( | void | ) |
グラフィックデータを持いないか?
Definition at line 40 of file TgaTool.cpp.
References TGAImage::gp.
Referenced by jbxl::MSGraph2TGAImage(), and jbxl::TGAImage2MSGraph().
00041 { 00042 if (gp==NULL) return true; 00043 return false; 00044 }
uByte& point | ( | int | x, | |
int | y, | |||
int | c | |||
) | [inline] |
Definition at line 46 of file TgaTool.h.
References TGAImage::col, TGAImage::gp, and TGAImage::xs.
Referenced by jbxl::MSGraph2TGAImage(), and jbxl::TGAImage2MSGraph().
void set | ( | int | x, | |
int | y, | |||
int | c | |||
) |
void TGAImage::set(int x, int y, int c)
Definition at line 86 of file TgaTool.cpp.
References TGAImage::col, TGAImage::getm(), TGAImage::gp, TGAImage::state, TGAImage::xs, and TGAImage::ys.
Referenced by jbxl::MSGraph2TGAImage().
00087 { 00088 getm(x, y, c); 00089 if (gp==NULL) return; 00090 00091 xs = x; 00092 ys = y; 00093 col = c; 00094 state = 0; 00095 00096 memset(gp, 0, xs*ys*col); 00097 00098 return; 00099 }
int col |
Definition at line 30 of file TgaTool.h.
Referenced by TGAImage::clear(), TGAImage::fill(), TGAImage::init(), jbxl::MSGraph2TGAImage(), TGAImage::point(), TGAImage::set(), jbxl::TGAImage2MSGraph(), jbxl::writeTGAData(), and jbxl::writeTGAFile().
Definition at line 34 of file TgaTool.h.
Referenced by TGAImage::clear(), TGAImage::fill(), TGAImage::free(), TGAImage::getm(), TGAImage::init(), TGAImage::isNull(), TGAImage::point(), jbxl::readTGAFile(), TGAImage::set(), jbxl::writeTGAData(), and jbxl::writeTGAFile().
Definition at line 33 of file TgaTool.h.
Referenced by TGAImage::init(), and jbxl::writeTGAData().
int state |
Definition at line 31 of file TgaTool.h.
Referenced by TGAImage::getm(), TGAImage::init(), jbxl::MSGraph2TGAImage(), jbxl::readTGAData(), jbxl::readTGAFile(), and TGAImage::set().
int xs |
Definition at line 28 of file TgaTool.h.
Referenced by TGAImage::clear(), TGAImage::fill(), TGAImage::init(), jbxl::MSGraph2TGAImage(), TGAImage::point(), TGAImage::set(), jbxl::TGAImage2MSGraph(), and jbxl::writeTGAData().
int ys |
Definition at line 29 of file TgaTool.h.
Referenced by TGAImage::clear(), TGAImage::fill(), TGAImage::init(), jbxl::MSGraph2TGAImage(), TGAImage::set(), jbxl::TGAImage2MSGraph(), and jbxl::writeTGAData().