textout_ex(3)
β¨ textout_ex β¨
okay bestie, welcome to the Allegro manual π this one's called textout_ex(3) and it's genuinely one of the cutest little functions in the whole Allegro game programming library. she writes a string on a bitmap. that's it. that's the whole job. and she EATS. π
πΈ NAME πΈ
textout_ex β writes a string on a bitmap. Allegro game programming library. π¦
β¨ SYNOPSIS β¨
#include <allegro.h>
void textout_ex(BITMAP *bmp, const FONT *f, const char *s, int x, int y,
int color, int bg);
π DESCRIPTION π
so basically, she writes the string s onto the bitmap at position x, y, using the font you picked, the foreground color you picked, and the background color you picked. no cap. that's the whole vibe. π
- if the background color is
-1, the text gets written transparently β like, no box behind it, just the letters floating there being main character energy β¨ - if the foreground color is
-1and you're using a color font, she draws it using the colors from the original font bitmap (the one you imported into the grabber program) β which is how you get multicolored text output. iconic behavior honestly π - for high and true color fonts, the foreground color is ignored and always treated as
-1. so don't even bother, she's not listening π
π Example π
/* Show the program's version in blue letters. */
textout_ex(screen, font, "v4.2.0-beta2", 10, 10,
makecol(0, 0, 255), -1);
not me showing the program version in blue letters with a transparent backgroundβ¦ the serve is real ππ
π SEE ALSO π
font(3)textout_centre_ex(3)textout_right_ex(3)textout_justify_ex(3)textprintf_ex(3)text_height(3)text_length(3)
and that's the whole page bestie π«Ά this was Allegro version 4.4.3, manual page textout_ex(3), and yes she's been that girl since forever. πβπ§
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms