00001 // Filename : OBITMAPW.H 00002 // Description : header file of bitmap class 00003 00004 #ifndef __OBITMAPW_H 00005 #define __OBITMAPW_H 00006 00009 class BitmapW { 00010 public: 00011 short width_field; 00012 short height_field; 00013 short bitmap[1]; // indefinite size 00014 00015 private: 00016 BitmapW(); // cannot make any instant 00017 00018 public: 00019 void init(short w, short h); 00020 00021 short get_width() { return width_field; } 00022 short get_height() { return height_field; } 00023 short get_pitch(); 00024 short get_true_pitch(); 00025 00026 short *get_ptr() { return bitmap; } 00027 short *get_ptr(short x, short y); 00028 00029 long size(); 00030 00031 // same parameter as init 00032 static BitmapW *mem_add_bitmap(short w, short h); 00033 static long size(short w, short h); // same parameter as init 00034 }; 00035 #endif