Ovis_Layer_Child_Decoration_Nth()
摘要
返回一个层的第 n 个子装饰。
语法
Ovis_Layer_Child_Decoration_Nth (layer_ptr, index)
| 参数 | 类型 | 说明 |
|---|---|---|
layer_ptr |
OvisT_Layer * |
层 |
index |
unsigned int |
索引号 |
返回类型
OvisT_Decoration *
若索引在子装饰数量范围内则返回该装饰;否则返回 OPC_NIL。
头文件
ovis_layer.h
详情
该函数返回与该层关联的第 n 个子装饰。
示例
OvisT_Layer * layer_ptr;
unsigned int count, i;
OvisT_Decoration * dec_ptr;
/* …layer created elsewhere */
count = Ovis_Layer_Child_Decoration_Count (layer_ptr);
for (i = 0; i < count; i++)
{
dec_ptr = Ovis_Layer_Child_Decoration_Nth (layer_ptr, i);
/* … do something with decoration */
}
错误
层为 NIL。
参考
使用函数 Ovis_Layer_Child_Decoration_Count() 可以获取层的子装饰数量。