claw::graphic::bitmap Class Reference

A class for bitmap images. More...

#include <bitmap.hpp>

Inheritance diagram for claw::graphic::bitmap:
claw::graphic::image

List of all members.

Classes

class  file_structure
 Tool class used for defining the structures of the datas stored in a bitmap file. More...
class  reader
 This class read data from a bitmap file and store it in an image. More...
class  writer
 This class write an image in a bitmap file. More...

Public Member Functions

 bitmap (unsigned int w, unsigned int h)
 Constructor. Creates an empty image.
 bitmap (const image &that)
 Copy constructor.
 bitmap (std::istream &f)
 Constructor. Load an image from a bitmap file.
void save (std::ostream &f) const
 Save the bitmap in a file.

Detailed Description

A class for bitmap images.

Author:
Julien Jorge

Definition at line 48 of file bitmap.hpp.


Constructor & Destructor Documentation

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

Constructor. Creates an empty image.

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

Definition at line 39 of file bitmap.cpp.

00040   : claw::graphic::image(w, h)
00041 {
00042 
00043 } // bitmap::bitmap() [constructor]

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

Copy constructor.

Parameters:
that Image to copy from.

Definition at line 50 of file bitmap.cpp.

00051   : claw::graphic::image(that)
00052 {
00053 
00054 } // bitmap::bitmap() [copy constructor]

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

Constructor. Load an image from a bitmap file.

Parameters:
f Bitmap file.

Definition at line 61 of file bitmap.cpp.

00062 {
00063   reader r(*this, f);
00064 } // bitmap::bitmap() [constructor, from file]


Member Function Documentation

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

Save the bitmap in a file.

Parameters:
f Destination file.

Definition at line 71 of file bitmap.cpp.

00072 {
00073   writer w(*this, f);
00074 } // bitmap::save()


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1