1textprintf_justify_ex(3)        Allegro manual        textprintf_justify_ex(3)
2
3
4

NAME

6       textprintf_justify_ex - Formatted justified output of a string. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void textprintf_justify_ex(BITMAP *bmp, const FONT *f, int x1,  x2,  y,
14       diff, color, bg, const char *fmt, ...);
15

DESCRIPTION

17       Like  textout_justify_ex(),  but  using a printf() style format string.
18       This function shares the text  length  limitation  of  textprintf_ex().
19       Example:
20
21          char *lines[] = {"Line %02d: Draws justified text",
22                           "Line %02d: within the specified",
23                           "Line %02d: x2-x1 area. But not",
24                           "Line %02d: T H I S !", NULL};
25          /* Show the justification marker. */
26          vline(screen, 300, 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             textprintf_justify_ex(screen, font, 0, 300, y, 180,
30                                   makecol(0, 0, 0), makecol(255, 255, 255),
31                                   lines[num], num);
32
33
34
35

SEE ALSO

37       textprintf_ex(3), textout_justify_ex(3)
38
39
40
41Allegro                          version 4.2.3        textprintf_justify_ex(3)
Impressum