Get the next explicit or automatic break within a string along with the logical width of the text, the string length, and a pointer to the next text line.
| GetStringBreak ( |
| |
IDirectFBFont
| |
*
|
thiz,
|
| |
const char
| |
*
|
text,
|
| |
int
| |
|
bytes,
|
| |
int
| |
|
max_width,
|
| |
int
| |
*
|
ret_width,
|
| |
int
| |
*
|
ret_str_length,
|
| |
const char
| |
**
|
ret_next_line
|
| ); |
The bytes specifies the maximum number of bytes to take from the string or -1 for complete NULL-terminated string.
从字符串中指定要画的最大字节数,或者为-1的时候画完字符串从NULL到结束。
The max_width specifies logical width of column onto which the text will be drawn. Then the logical width of fitted text is returned in ret_width. The returned width may overlap the max width specified if there's only one character that fits.
这个列中max_width指定将要画的文本的逻辑宽度。接着适合文本时返回逻辑宽度ret_width。如果适合只有一个字符时,返回的宽度也许会与指定的最大宽度重叠。
The number of characters that fit into this column is returned by the ret_str_length. This value can be used as the number of bytes to take when using DrawString().
字符数被返回通过装入在这列中的ret_str_length。这个值可以被用来做为字节数,当使用DrawString()时。
In ret_next_line a pointer to the next line of text is returned. This will point to NULL or the end of the string if there's no more break.
在ret_next_line里,一个指向这个文本下一行的指针被返回。如果没有更多的break,它将指向NULL或者是这个字符串的尾部。