Claw  1.7.3
Classes | Public Member Functions | List of all members
claw::graphic::gif::reader Class Reference

This class reads data from a gif file. The image is resized to the size of the screen (as defined in the gif file) and the frames are stored in a list of frames passed as parameter. More...

#include <gif.hpp>

Public Member Functions

 reader (image &img)
 Constructor. More...
 
 reader (image &img, std::istream &f)
 Constructor. More...
 
 reader (frame_list &frames, std::istream &f)
 Constructor. More...
 
 reader (image &img, frame_list &frames, std::istream &f)
 Constructor. More...
 
 ~reader ()
 Destructor.
 
void load (std::istream &f)
 Load the image data from a stream. More...
 

Detailed Description

This class reads data from a gif file. The image is resized to the size of the screen (as defined in the gif file) and the frames are stored in a list of frames passed as parameter.

Author
Julien Jorge

Definition at line 279 of file gif.hpp.

Constructor & Destructor Documentation

◆ reader() [1/4]

claw::graphic::gif::reader::reader ( image img)

Constructor.

Parameters
imgThe image in which we store the data.

Definition at line 272 of file gif_reader.cpp.

Referenced by reader().

◆ reader() [2/4]

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

Constructor.

Parameters
imgThe image in which we store the data.
fThe stream from which we read the data (gif file format).

The first frame of the gif will be saved in the image passed to the constructor.

Definition at line 287 of file gif_reader.cpp.

References load(), and reader().

◆ reader() [3/4]

claw::graphic::gif::reader::reader ( frame_list &  frames,
std::istream &  f 
)

Constructor.

Parameters
framesThe frames read from the file.
fThe stream from which we read the data (gif file format).

Definition at line 300 of file gif_reader.cpp.

References load(), and reader().

◆ reader() [4/4]

claw::graphic::gif::reader::reader ( image img,
frame_list &  frames,
std::istream &  f 
)

Constructor.

Parameters
imgThe image in which we store the data.
framesThe frames read from the file.
fThe stream from which we read the data (gif file format).

The first frame of the gif will be saved in the image passed to the constructor.

Definition at line 319 of file gif_reader.cpp.

References load().

Member Function Documentation

◆ load()

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

Load the image data from a stream.

Parameters
fThe stream from which we read the data (gif file format).

Definition at line 341 of file gif_reader.cpp.

References claw::graphic::image::begin(), CLAW_PRECOND, claw::graphic::image::end(), claw::graphic::gif::frame::get_delay(), claw::graphic::image::merge(), claw::graphic::gif::frame::set_delay(), claw::graphic::image::set_size(), and claw::graphic::transparent_pixel.

Referenced by reader().


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