CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
Public Member Functions | Public Attributes | Static Public Attributes
claw::graphic::gif::image_descriptor Struct Reference

List of all members.

Public Member Functions

bool has_color_table () const
 Tell if the file contains a global palette.
bool is_interlaced () const
 Tell if the data is interlaced.
unsigned int color_palette_size () const
 Get the size of the palette, if any.

Public Attributes

u_int_16 left
 Left position in the logical screen.
u_int_16 top
 Top position in the logical screen.
u_int_16 width
 Width of the image.
u_int_16 height
 Height of the image.
u_int_8 packed
 Some flags.

Static Public Attributes

static const u_int_8 block_id = 0x2C
 Identifier of the block.

Detailed Description

Description of an image in the file.

Definition at line 136 of file gif.hpp.


Member Function Documentation

unsigned int claw::graphic::gif::image_descriptor::color_palette_size ( ) const

Get the size of the palette, if any.

Definition at line 112 of file gif.cpp.

{
  if ( !has_color_table() )
    return 0;
  else
    return 1 << ((packed & 0x07) + 1);
} // gif::image_descriptor::color_palette_size()
bool claw::graphic::gif::image_descriptor::has_color_table ( ) const

Tell if the file contains a global palette.

Definition at line 94 of file gif.cpp.

{
  return (packed & 0x80) != 0;
} // gif::image_descriptor::has_color_table()
bool claw::graphic::gif::image_descriptor::is_interlaced ( ) const

Tell if the data is interlaced.

Definition at line 103 of file gif.cpp.

{
  return (packed & 0x40) != 0;
} // gif::image_descriptor::is_interlaced()

Member Data Documentation

Identifier of the block.

Definition at line 140 of file gif.hpp.

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

Height of the image.

Definition at line 158 of file gif.hpp.

Left position in the logical screen.

Definition at line 149 of file gif.hpp.

Some flags.

Definition at line 161 of file gif.hpp.

Top position in the logical screen.

Definition at line 152 of file gif.hpp.

Width of the image.

Definition at line 155 of file gif.hpp.


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