claw 1.9.0
 
Loading...
Searching...
No Matches
claw::graphic::gif::frame Class Reference

One frame in the animation. More...

#include <gif.hpp>

Inheritance diagram for claw::graphic::gif::frame:
Collaboration diagram for claw::graphic::gif::frame:

Public Types

typedef image super
 The type of the parent class.
 
- Public Types inherited from claw::graphic::image
typedef rgba_pixel pixel_type
 The type representing the colors of the pixels in the image.
 
typedef base_iterator< image, pixel_typeiterator
 The type of the iterator on the pixels of the image.
 
typedef base_iterator< const image, const pixel_typeconst_iterator
 The type of the iterator to access constant pixels.
 

Public Member Functions

 frame ()
 Constructor.
 
 frame (std::size_t w, std::size_t h)
 Constructor.
 
void set_delay (unsigned int d)
 Set the time duration of this frame.
 
unsigned int get_delay () const
 Get the time duration of this frame.
 
- Public Member Functions inherited from claw::graphic::image
 image ()
 Constructor. Creates an image without datas.
 
 image (unsigned int w, unsigned int h)
 Constructor. Creates an empty image.
 
 image (std::istream &f)
 Constructor. Reads an image from an input stream.
 
void swap (image &that)
 Swap the content of two images.
 
unsigned int width () const
 Gets image's width.
 
unsigned int height () const
 Gets image's height.
 
scanlineoperator[] (unsigned int i)
 Gets a line of the image.
 
const scanlineoperator[] (unsigned int i) const
 Gets a line of the image.
 
iterator begin ()
 Get an iterator pointing on the first pixel.
 
iterator end ()
 Get an iterator pointing just past the last pixel.
 
const_iterator begin () const
 Get an iterator pointing on the first pixel.
 
const_iterator end () const
 Get an iterator pointing just past the last pixel.
 
void merge (const image &that)
 Merge an image on the current image.
 
void merge (const image &that, const math::coordinate_2d< int > &pos)
 Merge an image on the current image.
 
void partial_copy (const image &that, const math::coordinate_2d< int > &pos)
 Copy an image on the current image.
 
void flip ()
 Set the image upside down.
 
void fill (const math::rectangle< int > r, const pixel_type &c)
 Fill an area of the image with a given color.
 
void set_size (unsigned int w, unsigned int h)
 Set a new size to the image.
 
void load (std::istream &f)
 Read the image from a stream.
 

Detailed Description

One frame in the animation.

Definition at line 55 of file gif.hpp.

Member Typedef Documentation

◆ super

The type of the parent class.

Definition at line 59 of file gif.hpp.

Constructor & Destructor Documentation

◆ frame() [1/2]

claw::graphic::gif::frame::frame ( )

Constructor.

Definition at line 35 of file gif_frame.cpp.

◆ frame() [2/2]

claw::graphic::gif::frame::frame ( std::size_t w,
std::size_t h )

Constructor.

Parameters
wThe width of the frame.
hThe height of the frame.

Definition at line 44 of file gif_frame.cpp.

Member Function Documentation

◆ get_delay()

unsigned int claw::graphic::gif::frame::get_delay ( ) const

Get the time duration of this frame.

Definition at line 61 of file gif_frame.cpp.

◆ set_delay()

void claw::graphic::gif::frame::set_delay ( unsigned int d)

Set the time duration of this frame.

Parameters
dThe delay.

Definition at line 53 of file gif_frame.cpp.


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