MCPcopy Create free account
hub / github.com/assaultcube/AC / text_bounds

Function text_bounds

source/src/rendertext.cpp:361–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void text_bounds(const char *str, int &width, int &height, int maxwidth)
362{
363 #define TEXTINDEX(idx)
364 #define TEXTTAB(idx) TEXTSETCOLUMN
365 #define TEXTWHITE(idx)
366 #define TEXTLINE(idx) if(x > width) width = x;
367 #define TEXTCOLOR(idx)
368 #define TEXTIGRAPH(idx) x += FONTH + 1;
369 #define TEXTCHAR(idx) x += curfont->chars[c-curfont->skip].w + 1;
370 #define TEXTWORD x += w + 1;
371 width = 0;
372 TEXTSKELETON
373 height = y + FONTH;
374 TEXTLINE(_)
375 #undef TEXTINDEX
376 #undef TEXTTAB
377 #undef TEXTWHITE
378 #undef TEXTLINE
379 #undef TEXTCOLOR
380 #undef TEXTIGRAPH
381 #undef TEXTCHAR
382 #undef TEXTWORD
383}
384
385void draw_text(const char *str, int left, int top, int r, int g, int b, int a, int cursor, int maxwidth)
386{

Callers 6

renderMethod · 0.85
gl_drawhudFunction · 0.85
text_widthFunction · 0.85
loopiMethod · 0.85
rendercommandFunction · 0.85
renderdocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected