claw::graphic::xbm::reader Class Reference

This class read data from a xbm file and store it in an image. More...

`#include <xbm.hpp>`

## Public Member Functions

| reader (image &img)
| Constructor. More...
| reader (image &img, std::istream &f)
| Constructor. More...
| reader (xbm &img, std::istream &f)
| Constructor. More...
| ~reader ()
| Destructor.
void | load (std::istream &f)
| Load an image from a xbm file. More...

## Detailed Description

This class read data from a xbm file and store it in an image.

Author
  Julien Jorge

Definition at line 53 of file xbm.hpp.

## Constructor & Destructor Documentation

## reader() [1/3]

claw::graphic::xbm::reader::reader | ( | image & | img | ) |

Constructor.

Parameters

  img | The image in which the data will be stored.

Definition at line 41 of file xbm_reader.cpp.

## reader() [2/3]

claw::graphic::xbm::reader::reader | ( | image & | img,
|  | std::istream & | f
| ) |  |

Constructor.

Parameters

  img | The image in which the data will be stored.
  f | The file from which we read the data.

Postcondition
  img contains the data from f.

Definition at line 54 of file xbm_reader.cpp.

References load().

## reader() [3/3]

claw::graphic::xbm::reader::reader | ( | xbm & | img,
|  | std::istream & | f
| ) |  |

Constructor.

Parameters

  img | The image in which the data will be stored.
  f | The file from which we read the data.

Postcondition
  img contains the data from f.

Definition at line 67 of file xbm_reader.cpp.

References load(), claw::graphic::xbm::set_hot(), and claw::graphic::xbm::set_name().

## Member Function Documentation

## load()

void claw::graphic::xbm::reader::load | ( | std::istream & | f | ) |

Load an image from a xbm file.

Parameters

  f | XBM file.

Definition at line 95 of file xbm_reader.cpp.

References claw::graphic::image::begin(), claw::graphic::black_pixel, CLAW_PRECOND, claw::graphic::image::end(), claw::graphic::image::set_size(), claw::graphic::white_pixel, claw::graphic::image::width(), claw::math::coordinate_2d< T >::x, and claw::math::coordinate_2d< T >::y.

Referenced by reader().

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

- xbm.hpp
- code/xbm_reader.cpp