|
|
|
@ -159,31 +159,37 @@ main(int argc, char **argv)
@@ -159,31 +159,37 @@ main(int argc, char **argv)
|
|
|
|
|
//memset(pixels, 0xFF, width * height * 4);
|
|
|
|
|
memset(pixels, 0x00, width * height * 4); |
|
|
|
|
|
|
|
|
|
int wrap = 100 + (t * 4 % width); |
|
|
|
|
|
|
|
|
|
int at = 75; |
|
|
|
|
struct v2 box; |
|
|
|
|
//render_utf_string(font, 18, pixels, width, L"The quick brown fox jumps over the lazy dog", 100, 150);
|
|
|
|
|
//render_utf_string(font, 12, pixels, width, L"This text is seriously small", 100, at); at += 12;
|
|
|
|
|
//render_utf_string(font, 13, pixels, width, L"This text is seriously small", 100, at); at += 13;
|
|
|
|
|
render_utf_string(font, 12, pixels, width, L"This text is seriously small", 100, at); at += 12; |
|
|
|
|
render_utf_string(font, 18, pixels, width, L"aolo2@avx:~/Documents/code/ttf-test (master) $", 100, at); at += 20; |
|
|
|
|
render_utf_string(font, 26, pixels, width, L"render_utf_string(font, 32, pixels, width, string3, 10 + w1 + w2, at);", 10, at); at += 24; |
|
|
|
|
render_utf_string(font, 24, pixels, width, L"The quick brown fox jumps over the lazy dog", 10, at); at += 24; |
|
|
|
|
box = render_utf_string(font, 12, pixels, width, L"This text is seriously small", wrap, 100, at); |
|
|
|
|
at += box.y; |
|
|
|
|
box = render_utf_string(font, 18, pixels, width, L"aolo2@avx:~/Documents/code/ttf-test (master) $", wrap, 100, at); at += 20; |
|
|
|
|
at += box.y; |
|
|
|
|
box = render_utf_string(font, 26, pixels, width, L"render_utf_string(font, 32, pixels, width, string3, 10 + w1 + w2, at);", wrap, 10, at); at += 24; |
|
|
|
|
at += box.y; |
|
|
|
|
box = render_utf_string(font, 24, pixels, width, L"The quick brown fox jumps over the lazy dog", wrap, 10, at); at += 24; |
|
|
|
|
|
|
|
|
|
wchar_t *string1 = L"iiiiiiiiiiiiiiiiiii"; |
|
|
|
|
wchar_t *string2 = L"something-some"; |
|
|
|
|
wchar_t *string3 = L"MORE MORE"; |
|
|
|
|
|
|
|
|
|
int w1 = get_string_width(&font, 32, string1, wcslen(string1)); |
|
|
|
|
int w2 = get_string_width(&font, 32, string2, wcslen(string2)); |
|
|
|
|
//get_string_width(&font, 32, string1, wcslen(string1));
|
|
|
|
|
//get_string_width(&font, 32, string2, wcslen(string2));
|
|
|
|
|
|
|
|
|
|
render_utf_string(font, 32, pixels, width, string1, 10, at); |
|
|
|
|
render_utf_string(font, 32, pixels, width, string2, 10 + w1, at); |
|
|
|
|
render_utf_string(font, 32, pixels, width, string3, 10 + w1 + w2, at); |
|
|
|
|
at += 80; |
|
|
|
|
render_utf_string(font, 80, pixels, width, L"~!@#$%^&*()_+;:,./\\||||", 10, at); |
|
|
|
|
//render_utf_string(font, 32, pixels, width, string1, 200, 10, at);
|
|
|
|
|
//render_utf_string(font, 32, pixels, width, string2, 200, 10 + w1, at);
|
|
|
|
|
//render_utf_string(font, 32, pixels, width, string3, 200, 10 + w1 + w2, at);
|
|
|
|
|
//at += 80;
|
|
|
|
|
//render_utf_string(font, 80, pixels, width, L"~!@#$%^&*()_+;:,./\\||||", 200, 10, at);
|
|
|
|
|
|
|
|
|
|
XPutImage(display, window, default_gc, xwindow_buffer, 0, 0, 0, 0, width, height); |
|
|
|
|
|
|
|
|
|
sleep(1); |
|
|
|
|
usleep(16667); |
|
|
|
|
|
|
|
|
|
++t; |
|
|
|
|
} |
|
|
|
|