Debian Codegraph @

docs/kxltextwidth.html

raw symbols SCIP
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
5 <meta name="GENERATOR" content="emacs">
6 <meta name="Author" content="kacchan">
7 <title>KXL_TextWidth</title>
8 </head>
9 <body text="#000000" bgcolor="#f0f0dc" link="#3366FF" vlink="#3366FF" alink="#FF0000">
10
11 <a href="kxlputtext.html">Prev</a>
12 <a href="KXL.html">Top</a>
13 <a href="kxlsetdrawcolor.html">Next</a>
14 <hr>
15
16 <b>Name</b><br><br>
17 <font size=+2>KXL_TextWidth</font><br><br>
18
19 <b>Synopsis</b><br>
20 <pre>KXL_PutText -- The drawing width of a text is obtained.</pre><br>
21
22 <b>Description</b><br>
23 <pre>Uint16 KXL_TextWidth(Uint8 *text);</pre><br>
24
25 <b>Arguments</b><br><br>
26 <table border="1">
27 <tr><td>text</td><td>Text which draws.</td>
28 </table>
29 <br><br>
30
31 <b>Return Value</b><br><br>
32 Drawing width of a text.
33 <br><br><br>
34
35 <b>Exsample</b><br>
36 <pre>
37 #include &lt;KXL.h&gt;
38
39 int main(void)
40 {
41 Uint8 *text = "kxl.org";
42 Uint16 w;
43
44 KXL_CreateWindow(100, 100, "sample", 0);
45 KXL_Font(NULL, 0xff, 0x00, 0x00);
46 w = <b>KXL_TextWidth(text);</b>
47 KXL_PutText(100 - w / 2, 10, text);
48 KXL_UpDateImm(0, 0, 100, 100);
49 getchar();
50 KXL_DeleteWindow();
51 return 0;
52 }
53 </pre>
54
55 </body>
56 </html>