textout_ex(3alleg4)
β¨ textout_ex β¨
okay so bestie, this one lives in the Allegro manual and it's literally called textout_ex β she writes a string on a bitmap π Allegro game programming library, you know the vibe.
πΈ 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 the whole point: she writes the string s onto the bitmap at position x, y, using the font you picked, plus a foreground color and a background color. That's it, that's the job π
now the iconic part, the little details that actually matter:
- if the background color is
-1, then the text gets written transparently β no box behind it, just vibes β¨ - if the foreground color is
-1and a color font is in use, it gets drawn using the colors from the original font bitmap (the one you imported into the grabber program, yes that one π) which is what lets you do multicolored text output. so pretty. - for high and true color fonts, the foreground color is ignored and always treated as
-1. no cap, she just does that. π
example time, here's the actual one:
/* Show the program's version in blue letters. */
textout_ex(screen, font, "v4.2.0-beta2", 10, 10,
makecol(0, 0, 255), -1);
π SEE ALSO π
font(3alleg4)textout_centre_ex(3alleg4)textout_right_ex(3alleg4)textout_justify_ex(3alleg4)textprintf_ex(3alleg4)text_height(3alleg4)text_length(3alleg4)
go read those too bestie, iykyk π«Ά
and that's the page!! brought to you by Allegro, version 4.4.3 β mwah, ily, go draw some text πβ¨ππ¦πΈ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms