bitblt.h

Thu, 27 Dec 2001 11:17:28 +0000

author
eric
date
Thu, 27 Dec 2001 11:17:28 +0000
changeset 3
317de52d8a63
parent 2
8ca2aaf0513f
child 11
30d18cf8bb67
permissions
-rw-r--r--

*** empty log message ***

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@3 32 #define FLIP_H 0x1
eric@3 33 #define FLIP_V 0x2
eric@3 34 #define TRANSPOSE 0x4
eric@3 35
eric@3 36 #define ROT_0 0x0
eric@3 37 #define ROT_90 (TRANSPOSE + FLIP_H)
eric@3 38 #define ROT_180 (FLIP_H + FLIP_V)
eric@3 39 #define ROT_270 (TRANSPOSE + FLIP_V)
eric@3 40
eric@3 41
eric@2 42 Bitmap *create_bitmap (u32 width, u32 height);
eric@2 43 void free_bitmap (Bitmap *bitmap);
eric@2 44 boolean get_pixel (Bitmap *bitmap, Point coord);
eric@2 45 void set_pixel (Bitmap *bitmap, Point coord, boolean value);
eric@2 46
eric@2 47 Bitmap *bitblt (Bitmap *src_bitmap,
eric@2 48 Rect src_rect,
eric@2 49 Bitmap *dest_bitmap,
eric@2 50 Point dest_upper_left,
eric@3 51 int scan,
eric@2 52 int tfn);