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 ***

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