S3D_DRAW_STRING(3)
π S3D_DRAW_STRING π
okay bestie, welcome to the s3d manual, page S3D_DRAW_STRING(3) β yes it's a whole section 3 function page, we're in library land now π
β¨ NAME β¨
s3d_draw_string β draw a simple string π
πΈ SYNOPSIS πΈ
#include <s3d.h>
int s3d_draw_string(const char *str, float *xlen);
π¦ DESCRIPTION π¦
so basically it renders the string str in Truetype format with the height 1, and then it hands you back the length of the rendered string in *xlen β or, if you literally do not care, set len=NULL to disable that whole thing π
here's the vibe, fr fr:
char str="hello world!";
float len;
s3d_select_font("vera");
s3d_draw_string(str, len);
// not interested in the length? do that: s3d_draw_string(str, NULL);
not me writing a whole string and then passing NULL because I only wanted the pixels, not the receipts π
π AUTHOR π
Simon Wunderlich
- Author of
s3dβ
and that's the whole page, bestie β no cap, every single detail is right there π«Ά
this came straight out of the s3d manual, page S3D_DRAW_STRING(3) β go forth and draw strings, you main character ππ
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms