-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpsplash-scanout.h
59 lines (50 loc) · 1.78 KB
/
psplash-scanout.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* pslash - a lightweight framebuffer splashscreen for embedded devices.
*
* Copyright (c) 2006 Matthew Allum <mallum@o-hand.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _HAVE_PSPLASH_SCANOUT_H
#define _HAVE_PSPLASH_SCANOUT_H
#include <stdint.h>
enum RGBMode {
RGB565,
BGR565,
RGB888,
BGR888,
GENERIC,
};
typedef struct PSplashScanout
{
struct PSplashScanout *next;
int width;
int height;
int bpp;
int stride;
char *data;
int angle;
enum RGBMode rgbmode;
int red_offset;
int red_length;
int green_offset;
int green_length;
int blue_offset;
int blue_length;
}
PSplashScanout;
extern void psplash_scanout_draw_rect(PSplashScanout *so, int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b);
extern void psplash_scanout_draw_image(PSplashScanout *so, int x, int y, int img_width, int img_height, int img_bytes_per_pixel, int img_rowstride, uint8_t *rle_data);
typedef struct PSplashFont PSplashFont;
extern void psplash_scanout_text_size(int *width, int *height, const PSplashFont *font, const char *text);
extern void psplash_scanout_draw_text(PSplashScanout *so, int x, int y, uint8_t r, uint8_t g, uint8_t b, const PSplashFont *font, const char *text);
#endif