KXL_PutText -- The drawing width of a text is obtained.
Uint16 KXL_TextWidth(Uint8 *text);
text | Text which draws. |
#include <KXL.h> int main(void) { Uint8 *text = "kxl.org"; Uint16 w; KXL_CreateWindow(100, 100, "sample", 0); KXL_Font(NULL, 0xff, 0x00, 0x00); w = KXL_TextWidth(text); KXL_PutText(100 - w / 2, 10, text); KXL_UpDateImm(0, 0, 100, 100); getchar(); KXL_DeleteWindow(); return 0; }