20
21 #include "psplash.h"
22 #include "psplash-config.h"
23 #include "psplash-colors.h"
24 #include "psplash-poky-img.h"
25 #include "psplash-bar-img.h"
26 #include "radeon-font.h"
27
28 #define SPLIT_LINE_POS(fb) \
29 ( (fb)->height \
30 - (( PSPLASH_IMG_SPLIT_DENOMINATOR \
31 - PSPLASH_IMG_SPLIT_NUMERATOR) \
32 * (fb)->height / PSPLASH_IMG_SPLIT_DENOMINATOR) \
33 )
34
35 void
36 psplash_exit (int UNUSED(signum))
37 {
38 DBG("mark");
39
40 psplash_console_reset ();
41 }
42
43 void
44 psplash_draw_msg (PSplashFB *fb, const char *msg)
45 {
46 int w, h;
47
48 psplash_fb_text_size (&w, &h, &radeon_font, msg);
49
50 DBG("displaying '%s' %ix%i\n", msg, w, h);
51
52 /* Clear */
53
54 psplash_fb_draw_rect (fb,
55 0,
56 SPLIT_LINE_POS(fb) - h,
57 fb->width,
58 h,
59 PSPLASH_BACKGROUND_COLOR);
60
61 psplash_fb_draw_text (fb,
62 (fb->width-w)/2,
63 SPLIT_LINE_POS(fb) - h,
64 PSPLASH_TEXT_COLOR,
65 &radeon_font,
66 msg);
67 }