bitblt.h

Wed, 02 Jan 2002 10:18:13 +0000

author
eric
date
Wed, 02 Jan 2002 10:18:13 +0000
changeset 36
a338db73c6f4
parent 35
41804cc569ab
child 42
9c85a4cd88a3
permissions
-rw-r--r--

bug fixes.

eric@2 1 typedef struct Point
eric@2 2 {
eric@35 3 s32 x;
eric@35 4 s32 y;
eric@2 5 } Point;
eric@2 6
eric@2 7 typedef struct Rect
eric@2 8 {
eric@2 9 Point upper_left;
eric@2 10 Point lower_right;
eric@2 11 } Rect;
eric@2 12
eric@2 13 typedef struct Bitmap
eric@2 14 {
eric@2 15 u8 *bits;
eric@35 16 s32 width;
eric@35 17 s32 height;
eric@2 18 u32 rowbytes;
eric@2 19 } Bitmap;
eric@2 20
eric@2 21
eric@2 22 #define TF_SRC 0xc
eric@2 23 #define TF_AND 0x8
eric@2 24 #define TF_OR 0xe
eric@2 25 #define TF_XOR 0x6
eric@2 26
eric@2 27
eric@3 28 #define FLIP_H 0x1
eric@3 29 #define FLIP_V 0x2
eric@3 30 #define TRANSPOSE 0x4
eric@3 31
eric@3 32 #define ROT_0 0x0
eric@3 33 #define ROT_90 (TRANSPOSE + FLIP_H)
eric@3 34 #define ROT_180 (FLIP_H + FLIP_V)
eric@3 35 #define ROT_270 (TRANSPOSE + FLIP_V)
eric@3 36
eric@3 37
eric@35 38 Bitmap *create_bitmap (s32 width, s32 height);
eric@2 39 void free_bitmap (Bitmap *bitmap);
eric@2 40 boolean get_pixel (Bitmap *bitmap, Point coord);
eric@2 41 void set_pixel (Bitmap *bitmap, Point coord, boolean value);
eric@2 42
eric@2 43 Bitmap *bitblt (Bitmap *src_bitmap,
eric@2 44 Rect src_rect,
eric@2 45 Bitmap *dest_bitmap,
eric@2 46 Point dest_upper_left,
eric@3 47 int scan,
eric@2 48 int tfn);