CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
Classes | Public Member Functions

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:
wImage's width.
hImage's height.
Precondition:
w > 0 and h > 0

Definition at line 39 of file bitmap.cpp.

  : claw::graphic::image(w, h)
{

} // bitmap::bitmap() [constructor]
claw::graphic::bitmap::bitmap ( const image that)

Copy constructor.

Parameters:
thatImage to copy from.

Definition at line 50 of file bitmap.cpp.

  : claw::graphic::image(that)
{

} // bitmap::bitmap() [copy constructor]
claw::graphic::bitmap::bitmap ( std::istream &  f)

Constructor. Load an image from a bitmap file.

Parameters:
fBitmap file.

Definition at line 61 of file bitmap.cpp.

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

Member Function Documentation

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

Save the bitmap in a file.

Parameters:
fDestination file.

Definition at line 71 of file bitmap.cpp.

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

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