Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 46 lines (40 sloc) 2.11 kB
07921e8 @hxw [grifo] updates from Symbio
hxw authored
1 /*
2 * Copyright (c) 2009 Openmoko Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef GLYPH_H
19 #define GLYPH_H
20
21 struct glyph {
22 unsigned char width;
23 unsigned char height;
24 signed char top_bearing;
25 unsigned int n_spacing_hints;
26 char data[0];
27 } __attribute__((packed));
28
4ed8b9d @hxw [grifo] more fixes for simulator
hxw authored
29
30 int buf_render_string(unsigned char *buf, int buf_width_pixels, int buf_width_bytes, const int font,
1f1b68f @hxw [grifo] tidy up spacing and remove CR characters
hxw authored
31 int start_x, int start_y, const unsigned char *string, int text_length, int inverted);
4ed8b9d @hxw [grifo] more fixes for simulator
hxw authored
32 int buf_render_string_right(unsigned char *buf, int buf_width_pixels, int buf_height_pixels,
1f1b68f @hxw [grifo] tidy up spacing and remove CR characters
hxw authored
33 int buf_width_bytes, const int font,
34 int start_x, int start_y, const unsigned char *string, int text_length, int inverted);
4ed8b9d @hxw [grifo] more fixes for simulator
hxw authored
35 int render_string(const int font, int off_x, int off_y, const unsigned char *string, int len, int inverted);
36 int render_string_right(const int font, int off_x, int off_y, const unsigned char *string, int len, int inverted);
07921e8 @hxw [grifo] updates from Symbio
hxw authored
37 void render_glyph(int start_x, int start_y, const struct glyph *glyph, char *buf);
38 int draw_glyphs_to_buf(const int font, int start_x, int start_y, const char *string, char *buf);
39 int render_string_and_clear(const int font, int start_x,
1f1b68f @hxw [grifo] tidy up spacing and remove CR characters
hxw authored
40 int start_y, const unsigned char *string, int text_length, int inverted,
41 int clear_start_x, int clear_start_y, int clear_end_x, int clear_end_y);
0252051 @hxw [wiki] Update from Symbio: ok button size increase
hxw authored
42 void render_string_centered(const int font, int start_x, int start_y, int max_width,
43 const unsigned char *string, int text_length, int inverted);
07921e8 @hxw [grifo] updates from Symbio
hxw authored
44 #endif /* GLYPH_H */
45
Something went wrong with that request. Please try again.