bitmap Class Reference

#include <bitmap.h>

Inheritance diagram for bitmap:

Inheritance graph
[legend]
Collaboration diagram for bitmap:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 bitmap ()
 bitmap (const istring &filename)
 bitmap (application_instance instance, const char *resource)
 bitmap (HGLOBAL global)
 ~bitmap ()
bool valid () const
int image_size () const
int width () const
int height () const
int colors () const
byteget_bits () const
BITMAPINFOHEADER * get_header () const
BITMAPINFOget_info () const
RGBQUADget_color_table () const
void reset ()
bool paint (HDC context, const RECT &update_rectangle, const RECT &bitmap_portion) const
paletteget_palette () const
bool load_from_file (const istring &fileName)
bool load_from_global (HGLOBAL glob)
bool load_from_resource (application_instance instance, const char *resource)
 bitmap (canvas &draw_on, int width=1, int height=1, const c_point &origin=c_point(0, 0))
 bitmap (const bitmap &to_copy_from)
 ~bitmap (void)
virtual void draw ()
virtual void erase ()
void reset (int width, int height)
virtual c_rectangle dimensions ()
bitmapoperator= (const bitmap &to_assign_from)
bool read_bitmap (const char *name_of_bitmap_file)
bool write_bitmap (const char *name_of_bitmap_file)

Protected Member Functions

int warp (int to_warp) const

Protected Attributes

int _height
int _width
byte_image

Detailed Description

Definition at line 30 of file bitmap.h.


Constructor & Destructor Documentation

bitmap::bitmap (  ) 

Definition at line 35 of file bitmap.cpp.

bitmap::bitmap ( const istring filename  ) 

Definition at line 40 of file bitmap.cpp.

References load_from_file().

bitmap::bitmap ( application_instance  instance,
const char *  resource 
)

Definition at line 45 of file bitmap.cpp.

References load_from_resource().

bitmap::bitmap ( HGLOBAL  global  ) 

Definition at line 50 of file bitmap.cpp.

References load_from_global().

bitmap::~bitmap (  ) 

Definition at line 55 of file bitmap.cpp.

References NIL, and reset().

bitmap::bitmap ( canvas draw_on,
int  width = 1,
int  height = 1,
const c_point &  origin = c_point(0, 0) 
)

Definition at line 46 of file bitmap.cpp.

References reset().

bitmap::bitmap ( const bitmap to_copy_from  ) 

bitmap::~bitmap ( void   ) 


Member Function Documentation

bool bitmap::valid (  )  const [inline]

Definition at line 46 of file bitmap.h.

Referenced by paint(), and static_bitmap::valid().

int bitmap::image_size (  )  const

Definition at line 240 of file bitmap.cpp.

References height(), and width().

int bitmap::width (  )  const

Definition at line 253 of file bitmap.cpp.

Referenced by image_size(), and static_bitmap::paint().

int bitmap::height (  )  const

Definition at line 255 of file bitmap.cpp.

Referenced by image_size(), paint(), and static_bitmap::paint().

int bitmap::colors (  )  const

Definition at line 257 of file bitmap.cpp.

Referenced by load_from_file().

byte * bitmap::get_bits (  )  const

Definition at line 273 of file bitmap.cpp.

BITMAPINFOHEADER * bitmap::get_header (  )  const

Definition at line 267 of file bitmap.cpp.

BITMAPINFO * bitmap::get_info (  )  const

Definition at line 269 of file bitmap.cpp.

RGBQUAD * bitmap::get_color_table (  )  const

Definition at line 271 of file bitmap.cpp.

void bitmap::reset (  ) 

Definition at line 62 of file bitmap.cpp.

References NIL, and palette::reset().

Referenced by bitmap(), load_from_file(), load_from_global(), load_from_resource(), and ~bitmap().

bool bitmap::paint ( HDC  context,
const RECT &  update_rectangle,
const RECT &  bitmap_portion 
) const

Definition at line 275 of file bitmap.cpp.

References height(), HEIGHT, NIL, valid(), WIDTH, and palette::win_palette().

Referenced by static_bitmap::paint().

palette& bitmap::get_palette (  )  const [inline]

Definition at line 83 of file bitmap.h.

Referenced by static_bitmap::realize_palette().

bool bitmap::load_from_file ( const istring fileName  ) 

Definition at line 105 of file bitmap.cpp.

References byte_filer::close(), colors(), byte_filer::FROM_START, byte_filer::good(), byte_filer::length(), NIL, byte_filer::read(), read, reset(), and byte_filer::seek().

Referenced by bitmap(), and static_bitmap::load().

bool bitmap::load_from_global ( HGLOBAL  glob  ) 

Definition at line 95 of file bitmap.cpp.

References reset().

Referenced by bitmap(), and load_from_resource().

bool bitmap::load_from_resource ( application_instance  instance,
const char *  resource 
)

Definition at line 82 of file bitmap.cpp.

References load_from_global(), and reset().

Referenced by bitmap(), and static_bitmap::load().

void bitmap::draw (  )  [virtual]

Reimplemented from paintable.

Definition at line 97 of file bitmap.cpp.

References geometric::screen_rectangle::bottom_left(), c_rectangle, paintable::target(), and canvas::world().

Referenced by erase(), and main().

void bitmap::erase (  )  [virtual]

Reimplemented from paintable.

Definition at line 122 of file bitmap.cpp.

References draw().

void bitmap::reset ( int  width,
int  height 
)

Definition at line 56 of file bitmap.cpp.

References _height, _image, _width, allocate(), and WHACK().

c_rectangle bitmap::dimensions (  )  [virtual]

Definition at line 64 of file bitmap.cpp.

References _height, _width, c_point, c_rectangle, and drawable::origin().

bitmap& bitmap::operator= ( const bitmap to_assign_from  ) 

bool bitmap::read_bitmap ( const char *  name_of_bitmap_file  ) 

Definition at line 69 of file bitmap.cpp.

References _height, _image, _width, allocate(), fail(), and WHACK().

bool bitmap::write_bitmap ( const char *  name_of_bitmap_file  ) 

Definition at line 83 of file bitmap.cpp.

References _height, _image, _width, and fail().

int bitmap::warp ( int  to_warp  )  const [protected]

Definition at line 95 of file bitmap.cpp.

References _height.


Member Data Documentation

int bitmap::_height [protected]

Definition at line 69 of file bitmap.h.

Referenced by dimensions(), read_bitmap(), reset(), warp(), and write_bitmap().

int bitmap::_width [protected]

Definition at line 70 of file bitmap.h.

Referenced by dimensions(), read_bitmap(), reset(), and write_bitmap().

byte* bitmap::_image [protected]

Definition at line 71 of file bitmap.h.

Referenced by read_bitmap(), reset(), and write_bitmap().


The documentation for this class was generated from the following files:
Generated on Tue Aug 19 05:12:11 2008 for HOOPLE Libraries by  doxygen 1.5.1