Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #ifndef __MGTK_BITMAP_H
  2. #define __MGTK_BITMAP_H
  3.  
  4. #include<mgtk/widget.h>
  5. #include<stdio.h>
  6. extern "C" {
  7. #include<libmgfx.h>
  8. }
  9.  
  10. /* Image is 24-bit RGB bitmap */
  11. class GImagePool: public GWidget
  12. {
  13. public:
  14.     GImagePool(GRect *);
  15.     virtual ~GImagePool();
  16.     virtual void DrawWidget();
  17.     virtual void Write(unsigned long,unsigned long,char *);
  18.     virtual void Load(FILE *);
  19.     virtual void Save(FILE *);
  20.     virtual void PutPixel(int,int,unsigned long);
  21.     GImagePool * Duplicate(GImagePool * Img);
  22. private:
  23.     char * image_data;
  24.     unsigned long scan_size,image_size;
  25. };
  26.  
  27. class GPicture: public GWidget
  28. {
  29. public:
  30.  GPicture(GRect * r,char * filename);
  31.  virtual ~GPicture();
  32.  virtual void DrawWidget();
  33.  virtual bool Load(char *);
  34. private:
  35.  mgfx_image_t * img;
  36. };
  37.    
  38. #endif
  39.