Public Types | Public Member Functions | Public Attributes | Static Public Attributes

claw::graphic::gif::graphic_control_extension Struct Reference

Extension describing a rendering block. More...

List of all members.

Public Types

enum  disposal_method { dispose_none, dispose_do_not_dispose, dispose_background, dispose_previous }
 

Tell how to initialise the canvas before rendering a frame.

More...

Public Member Functions

disposal_method get_disposal_method () const
 Get the disposal method of the frame.
bool has_transparent_color () const
 Tell if the palette contains a transparent color.

Public Attributes

u_int_8 block_size
 Number of bytes in the block.
u_int_8 packed
 Some flags.
u_int_16 delay
 Hundredths of a second to wait before continuing.
u_int_8 transparent_color
 Index of the transparent color in the palette.
u_int_8 terminator
 Block terminator.

Static Public Attributes

static const u_int_8 block_label = 0xF9
 Identifier of the extension.

Detailed Description

Extension describing a rendering block.

Definition at line 184 of file gif.hpp.


Member Enumeration Documentation

Tell how to initialise the canvas before rendering a frame.

Enumerator:
dispose_none 

No disposal specified. The decoder is not required to take any action.

dispose_do_not_dispose 

Do not dispose. The graphic is to be left in place.

dispose_background 

Restore to background color. The area used by the graphic must be restored to the background color.

dispose_previous 

Restore to previous. The decoder is required to restore the area overwritten by the graphic with what was there prior to rendering the graphic.

Definition at line 192 of file gif.hpp.


Member Function Documentation

claw::graphic::gif::graphic_control_extension::disposal_method claw::graphic::gif::graphic_control_extension::get_disposal_method (  ) const

Get the disposal method of the frame.

Definition at line 64 of file gif.cpp.

Referenced by claw::graphic::gif::reader::read_frame_with_gce().

{
  switch( (packed & 0x1C) >> 2 )
    {
    case 0: return dispose_none;
    case 1: return dispose_do_not_dispose;
    case 2: return dispose_background;
    case 3: return dispose_previous;
    default:
      return dispose_previous;
    }
} // gif::graphic_control_extension::get_disposal_method()
bool claw::graphic::gif::graphic_control_extension::has_transparent_color (  ) const

Tell if the palette contains a transparent color.

Definition at line 82 of file gif.cpp.

Referenced by claw::graphic::gif::reader::read_frame_with_gce().

{
  return (packed & 0x01) != 0;
} // gif::graphic_control_extension::has_transparent_color()

Member Data Documentation

Identifier of the extension.

Definition at line 188 of file gif.hpp.

Referenced by claw::graphic::gif::reader::read_data(), and claw::graphic::gif::reader::read_frame_with_gce().

Number of bytes in the block.

Definition at line 218 of file gif.hpp.

Hundredths of a second to wait before continuing.

Definition at line 224 of file gif.hpp.

Referenced by claw::graphic::gif::reader::read_frame_with_gce().

Some flags.

Definition at line 221 of file gif.hpp.

Block terminator.

Definition at line 230 of file gif.hpp.

Index of the transparent color in the palette.

Definition at line 227 of file gif.hpp.

Referenced by claw::graphic::gif::reader::read_frame_with_gce().


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