A class for xbm pictures. More...
#include <xbm.hpp>
Classes | |
class | reader |
This class read data from a xbm file and store it in an image. More... | |
class | writer |
This class write an image in a xbm file. More... | |
Public Member Functions | |
xbm (unsigned int w, unsigned int h) | |
Constructor. Creates an empty image. | |
xbm (const image &that) | |
Copy constructor. | |
xbm (std::istream &f) | |
Constructor. Load an image from a xbm file. | |
~xbm () | |
Destructor. | |
void | save (std::ostream &os) const |
Save the image. | |
void | set_name (const std::string &name) |
Set the name of the image. | |
void | set_hot (const claw::math::coordinate_2d< int > &hot) |
Set the hot spot of the image. | |
Private Attributes | |
std::string | m_name |
The name of the image structure in the file. | |
claw::math::coordinate_2d< int > * | m_hot |
The position of the hot spot in the image. |
A class for xbm pictures.
Definition at line 45 of file xbm.hpp.
claw::graphic::xbm::xbm | ( | unsigned int | w, | |
unsigned int | h | |||
) |
claw::graphic::xbm::xbm | ( | const image & | that | ) |
claw::graphic::xbm::xbm | ( | std::istream & | f | ) |
claw::graphic::xbm::~xbm | ( | ) |
void claw::graphic::xbm::save | ( | std::ostream & | f | ) | const |
void claw::graphic::xbm::set_hot | ( | const claw::math::coordinate_2d< int > & | hot | ) |
Set the hot spot of the image.
hot | The hot spot of the image; |
Definition at line 102 of file xbm.cpp.
References m_hot.
Referenced by claw::graphic::xbm::reader::reader().
00103 { 00104 if (m_hot != NULL) 00105 delete m_hot; 00106 00107 m_hot = new claw::math::coordinate_2d<int>(hot); 00108 } // xbm::set_hot()
void claw::graphic::xbm::set_name | ( | const std::string & | name | ) |
claw::math::coordinate_2d<int>* claw::graphic::xbm::m_hot [private] |
std::string claw::graphic::xbm::m_name [private] |
The name of the image structure in the file.
Definition at line 146 of file xbm.hpp.
Referenced by save(), and set_name().