-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpixel.h
30 lines (24 loc) · 991 Bytes
/
pixel.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
/********************************************************
* @author Airead Fan <[email protected]> *
* @date 2011 9月 04 21:03:11 CST *
********************************************************
* after studying C 48 days *
* after studying APUE 13 days *
********************************************************/
#ifndef FB_PIXEL_H
#define FB_PIXEL_H
#include "framebuffer.h"
#include "screen.h"
typedef unsigned long COLOR_32; /* 0x0f0f0f0f: transp, red, green, blue*/
typedef struct point{
int x;
int y;
COLOR_32 color;
}FB_POINT;
int fb_set_pixel(FB_POINT *point, int x, int y, COLOR_32 color);
int fb_set_pixel_trans(FB_POINT *point, int x, int y, unsigned char trans);
int fb_draw_pixel(struct framebuffer *fbp, FB_POINT *point);
int fb_draw_pixel_screen(FB_SCREEN *screenp, FB_POINT *point);
int fb_draw_pixel_screen_trans(FB_SCREEN *screenp, FB_POINT *point);
unsigned long fb_formatRGB(unsigned char red, unsigned char green, unsigned char blue);
#endif