1textout_justify_ex(3) Allegro manual textout_justify_ex(3)
2
3
4
6 textout_justify_ex - Draws justified text within a region. Allegro game
7 programming library.
8
10 #include <allegro.h>
11
12
13 void textout_justify_ex(BITMAP *bmp, const FONT *f, const char *s, int
14 x1, int x2, int y, int diff, int color, int bg);
15
17 Draws justified text within the region x1-x2. If the amount of spare
18 space is greater than the diff value, it will give up and draw regular
19 left justified text instead. Example:
20
21 char *lines[] = {"Draws justified text",
22 "within the specified",
23 "x2-x1 area. But not",
24 "T H I S !", NULL};
25 /* Show the justification marker. */
26 vline(screen, 200, 0, SCREEN_H-1, makecol(0, 0, 0));
27 /* Draw all the lines until we reach a NULL entry. */
28 for (num = 0, y = 0; lines[num]; num++, y += text_height(font))
29 textout_justify_ex(screen, font, lines[num], 0, 200,
30 y, 80, makecol(0, 0, 0),
31 makecol(255, 255, 255));
32
33
35 textout_ex(3), textprintf_justify_ex(3)
36
37
38
39Allegro version 4.2.3 textout_justify_ex(3)