L4Re - L4 Runtime Environment
font.h
Go to the documentation of this file.
1 
5 /*
6  * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
7  * economic rights: Technische Universit├Ąt Dresden (Germany)
8  * This file is part of TUD:OS and distributed under the terms of the
9  * GNU Lesser General Public License 2.1.
10  * Please see the COPYING-LGPL-2.1 file for details.
11  */
12 #pragma once
13 
14 #include <l4/sys/compiler.h>
15 #include <l4/re/c/video/view.h>
16 #include <l4/libgfxbitmap/bitmap.h>
17 
27 
31 #define GFXBITMAP_DEFAULT_FONT (void *)0
32 
38 enum { GFXBITMAP_USE_STRLEN = ~0U };
39 
41 
43 typedef void *gfxbitmap_font_t;
44 
53 L4_CV int gfxbitmap_font_init(void);
54 
62 L4_CV gfxbitmap_font_t gfxbitmap_font_get(const char *name);
63 
70 L4_CV unsigned
72 
79 L4_CV unsigned
81 
89 L4_CV void *
90 gfxbitmap_font_data(gfxbitmap_font_t font, unsigned c);
91 
105 L4_CV void
107  gfxbitmap_font_t font, const char *text, unsigned len,
108  unsigned x, unsigned y,
110 
126 L4_CV void
128  gfxbitmap_font_t font, const char *text, unsigned len,
129  unsigned x, unsigned y,
131  int scale_x, int scale_y);
unsigned gfxbitmap_font_width(gfxbitmap_font_t font)
Get the font width.
void gfxbitmap_font_text(void *fb, l4re_video_view_info_t *vi, gfxbitmap_font_t font, const char *text, unsigned len, unsigned x, unsigned y, gfxbitmap_color_pix_t fg, gfxbitmap_color_pix_t bg)
Render a string to a framebuffer.
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
int gfxbitmap_font_init(void)
Initialize the library.
View information structure.
Definition: view.h:59
L4 compiler related defines.
unsigned int gfxbitmap_color_pix_t
Specific color type.
Definition: bitmap.h:66
void gfxbitmap_font_text_scale(void *fb, l4re_video_view_info_t *vi, gfxbitmap_font_t font, const char *text, unsigned len, unsigned x, unsigned y, gfxbitmap_color_pix_t fg, gfxbitmap_color_pix_t bg, int scale_x, int scale_y)
Render a string to a framebuffer, including scaling.
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
#define L4_CV
Define calling convention.
Definition: linkage.h:44
unsigned gfxbitmap_font_height(gfxbitmap_font_t font)
Get the font height.
gfxbitmap_font_t gfxbitmap_font_get(const char *name)
Get a font descriptor.
void * gfxbitmap_font_t
Font.
Definition: font.h:43
Bitmap renderer header file.
void * gfxbitmap_font_data(gfxbitmap_font_t font, unsigned c)
Get bitmap font data for a specific character.