#ifndef __BITMAP_H
#define __BITMAP_H

#include "screen.h"
#include "graphic.h"

class Bitmap : public GObject
{
  public:
    Bitmap( Screen* newScreen, int x0, int y0, int width, int height );
    Bitmap( Bitmap& );
    Bitmap& operator= ( Bitmap& );
    virtual ~Bitmap( void );
    virtual void draw( void );
    virtual void saveBackground( void );
    virtual void restoreBackground( void );

    virtual Bool isOver( int x, int y );
    virtual int  checkAndSetBounds( int& x, int& y );
    virtual int  checkAndSetBounds( int& x, int& y, GObject* object );

    virtual inline int North( void );
    virtual inline int South( void );
    virtual inline int East( void );
    virtual inline int West( void );

    virtual inline void setWidth( int );
    virtual inline void setHeight( int );
    virtual inline int getWidth( void );
    virtual inline int getHeight( void );

  protected:
    AreaBuffer* bBuffer;  // Bitmapbuffer
    int width, height;
    int cOldWidth;
    int cOldHeight;
};

#endif // __BITMAP_H
