Ovis_Text_String_Get()
摘要
返回 Ovis 装饰的文本字符串。
语法
Ovis_Text_String_Get (text_ptr, buf_size, buffer)
| 参数 | 类型 | 说明 |
|---|---|---|
text_ptr |
OvisT_Text * |
Ovis 文本字符串 |
buf_size_ptr |
size_t * |
缓冲区的最大长度(字节) |
buffer |
char * |
缓冲区 |
返回类型
OvisT_Compcode
若缓冲区大小不足以存放文本值,buf_size_ptr 将被设置为所需的尺寸,且函数返回 OvisC_Compcode_Failure。
头文件
ovis_decoration.h
详情
该函数返回 Ovis 装饰的文本字符串。
示例
OvisT_2D_Text * text;
size_t size;
char buffer [100];
/* … text created at some point */
size = 100;
Ovis_Text_String_Get (text, &size, buffer);
错误
- 装饰对象为 NIL。
- Size 参数为 NIL。
- 字符串缓冲区为 NIL。
- 只能从文本对象获取文本。
参考
- 使用函数 Ovis_Text_String_Set() 可指定文本值。