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

Some informations on the screen where the image is rendered. More...

List of all members.

Public Member Functions

bool has_global_color_table () const
 Tell if the file contains a global palette.
unsigned int color_palette_size () const
 Get the size of the palette, if any.

Public Attributes

u_int_16 screen_width
 Logical screen width.
u_int_16 screen_height
 Logical screen height.
u_int_8 packed
 Some flags.
u_int_8 background_color
 Background color index.
u_int_8 aspect_ratio
 Pixel aspect ratio.

Detailed Description

Some informations on the screen where the image is rendered.

Definition at line 111 of file gif.hpp.


Member Function Documentation

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

Get the size of the palette, if any.

Definition at line 48 of file gif.cpp.

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

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

Tell if the file contains a global palette.

Definition at line 39 of file gif.cpp.

References packed.

Referenced by claw::graphic::gif::reader::fill_background(), and claw::graphic::gif::reader::read_screen_descriptor().

{
  return (packed & 0x80) != 0;
} // gif::screen_descriptor::has_global_color_table()

Member Data Documentation

Pixel aspect ratio.

Definition at line 131 of file gif.hpp.

Background color index.

Definition at line 128 of file gif.hpp.

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

Some flags.

Definition at line 125 of file gif.hpp.

Referenced by has_global_color_table().

Logical screen height.

Definition at line 122 of file gif.hpp.

Referenced by claw::graphic::gif::reader::make_frames(), and claw::graphic::gif::reader::read_frame_data().

Logical screen width.

Definition at line 119 of file gif.hpp.

Referenced by claw::graphic::gif::reader::make_frames(), and claw::graphic::gif::reader::read_frame_data().


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