Claw  1.7.0
Classes | Public Member Functions
claw::graphic::xbm Class Reference

A class for xbm pictures. More...

#include <xbm.hpp>

Inheritance diagram for claw::graphic::xbm:
claw::graphic::image

List of all members.

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.

Detailed Description

A class for xbm pictures.

Author:
Julien Jorge

Definition at line 45 of file xbm.hpp.


Constructor & Destructor Documentation

claw::graphic::xbm::xbm ( unsigned int  w,
unsigned int  h 
)

Constructor. Creates an empty image.

Parameters:
wImage's width.
hImage's height.
Precondition:
w > 0 and h > 0

Definition at line 39 of file xbm.cpp.

claw::graphic::xbm::xbm ( const image that)

Copy constructor.

Parameters:
thatImage to copy from.

Definition at line 50 of file xbm.cpp.

claw::graphic::xbm::xbm ( std::istream &  f)

Constructor. Load an image from a xbm file.

Parameters:
fXbm file.

Definition at line 61 of file xbm.cpp.


Member Function Documentation

void claw::graphic::xbm::save ( std::ostream &  f) const

Save the image.

Parameters:
fThe file in which we write.

Definition at line 82 of file xbm.cpp.

Referenced by claw::graphic::xbm::writer::writer().

Set the hot spot of the image.

Parameters:
hotThe hot spot of the image;

Definition at line 102 of file xbm.cpp.

Referenced by claw::graphic::xbm::reader::reader().

void claw::graphic::xbm::set_name ( const std::string &  name)

Set the name of the image.

Parameters:
nameThe name of the image;

Definition at line 92 of file xbm.cpp.

Referenced by claw::graphic::xbm::reader::reader().


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