bitblt.h

Thu, 27 Dec 2001 11:04:43 +0000

author
eric
date
Thu, 27 Dec 2001 11:04:43 +0000
changeset 2
8ca2aaf0513f
child 3
317de52d8a63
permissions
-rw-r--r--

Initial revision

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