-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObitmapw.h
35 lines (27 loc) · 901 Bytes
/
Obitmapw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Filename : OBITMAPW.H
// Description : header file of bitmap class
#ifndef __OBITMAPW_H
#define __OBITMAPW_H
//!UI classes for drawing bitmap images. Not sure of the difference between
//!Bitmap and BitmapW.
class BitmapW {
public:
short width_field;
short height_field;
short bitmap[1]; // indefinite size
private:
BitmapW(); // cannot make any instant
public:
void init(short w, short h);
short get_width() { return width_field; }
short get_height() { return height_field; }
short get_pitch();
short get_true_pitch();
short *get_ptr() { return bitmap; }
short *get_ptr(short x, short y);
long size();
// same parameter as init
static BitmapW *mem_add_bitmap(short w, short h);
static long size(short w, short h); // same parameter as init
};
#endif